[jQuery] attribute selector order
(Firefox 3.0.10, OS X) Can anyone explain why these two statements would return different sets?
[jQuery] store array in cookie
I need a way to store an associative array in a cookie. Or maybe JSON encoded string. I am using jquery. var cookie=[]; cookie["product_1"]=[]; cookie["product_1"][cookie["product_1"].length]=12; $.cookie('uploads', $.toJSON(cookie), { path: '/', expires: 10 });
[jQuery] $.get() fetch a list of images
Hi all! I'm facing a problem, and it seems very unlogical that it doesn't work. I've written a function to switch some images on a clients website. It takes images from an array, and displays them with some nice fades. Now I'm trying to fetch these images using AJAX, initially from a text file, later I'll fetch them from a php script which fetches them from a database. The script outputs like this: image1.png,image2.png,image3.jpg,image4.jpg,image5.png in the script I use the following to split it
[jQuery] jquery newbie question - .load() does not work after form submission
Unable to figure out why my load function stops working after a form submit. On the page I have two different forms. After submitting the first form - I come back to the page now when I click the add button - I see an alert message but no JSP loaded. I don't see any interaction with the server at all. [code] $ (function() { $('#add_value').click( function() { alert("inside click"); $('#descriptor_value').load( 'descriptorValue.jsp', function(){return false;}); })
[jQuery] Begginner Problems......
Hello! Sorry but i just started with Jquery and hereby ask for your Support: <script type="text/javascript"> $(document).ready(function() { $('#desperation input[type=image]').attr('disabled', true).fadeTo ("fast", 0.10); $('#1').attr('disabled', false).fadeTo("fast", 0.70); }); $('#1').toggle( function () { $('#1').click(function() { $('#1').fadeTo("fast", 1.00).attr('checked', true); $('#2').attr('disabled', false); }); }, function () { $('#1').click(function() { $('#1').fadeTo("fast",
[jQuery] How to tell if $(window).load() has already fired
I have a script that is being inserted dynamically via another script. The code in that script is wrapped inside the $(window).load () event because it requires the images on the page to have all loaded. In some browsers it works fine, but in others it seems not to fire because the page has already finished loading by the time the code is run. Is there any way to check and see if the page has already finished loading? Since it is a dynamically inserted script I don't have access to the onload event
[jQuery] Superfish - align to bottom of div
Hi, I have a div and I would like to align super fish menu to sit at the bottom of it. Doing it this way, superfish ul seems to have a margin-bottom of 16px and I can't seem to get rid of it. I'm open to suggestions or doing it a completely different way. Thanks! HTML: <div id="header"> <ul class="sf-menu"> <li><a href="tuners.html">Tuners</a> <li><a href="amps.html">Amps</a> <li><a href="tuners.html">Wires</a> </ul> </div> STYLE: #header { background-image: url('menu_files/bannerbg.jpg'); background-repeat:
[jQuery] jQuery Cycle plugin (help show/hide slide shows on same page)?
Hi all, I'm trying to setup multiple cycle slide shows on the same page; Only they occupy the same space on the page. So, I'm trying to hide the second slide show right away (no problem showing the first automatically), but when I attempt to hide the first and show the second, nothing happens. Is it even possible? or.. am I needing to find another way to do it? Thanks
[jQuery] Opacity and IE
Not sure if this is a bug or me. I have a div that contains an image. The div has position relative and the image within it has position absolute. The image is wider than the div and I want the image to display outside the div. So far, everything works fine, however if I change the opacity of the div, any part of the image that falls outside it disappears in IE only. If I remove the code that changes the div's opacity, it shows up fine in IE. Is there a bug in jquery/IE that would cause this or am
[jQuery] Cut string from this position an onward...
I need to simupate AS/400 keybord work... I need to be able to do when a key is pressed, to delete all text from the position of the pointer (which means that if I am in the middle of the word then cut the right part of it) and to move to the next input field. How can I do that?
[jQuery] loading message
Hi guys, I'm working on a Rails app connected to a legacy database. Since the reading process from the database takes several seconds (up to ten) I would like to display a loading message while the page is loading. Can I achieve that using jQuery? If so how? Thanks and have a nice day. Sig
[jQuery] Change keyCode of triggered event...
Hi, all.. I need to change a keycode of triggered event... What I need to do, is when a user pressing right + key on the numpud, I need it to be "TAB" instead... Since I cannt know when on the screen he will do it, I cannt use itaration of elements... I cannt know what will be the next element... here is the code I tried, any help will be appriciated.: Code: $(function() { $("form input").keydown(function (e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { // alert('SUBMIT '+this.name)
[jQuery] [validate] multiple errorClass question
To get the effect I want, I've had to patch the jquery validate library. Is there a simpler method instead? Problem: I want my error label element to have two classes, and for it's distant parent to have a class, so I do some tweaking to the label argument of the errorPlacement option. When validation runs, it resets the classes on the label and adds the 1 error class. So I see a flash of what I want for a second. Initial Solution: jquery.validate.js line 600 (inside of showLabel) - label.removeClass().addClass(
[jQuery] Question about Click Function
Hello! Sorry i´m a absolute beginner with JQuery, therefore this Question may be somewhat trivial: My Goal is to make <input type= image> buttons in a row. The first one is activated. Once u click the first one it is "checked" AND the next one must be activated. the work i´ve done so far is: <script type="text/javascript"> $(document).ready(function() { $('#desperation input[type=image]').attr('disabled', true).fadeTo ("fast", 0.10); $('#1').attr('disabled', false).fadeTo("fast", 0.70); }); $(this).click(function()
[jQuery] SOT: execute JS before a specific image loads
Can I intercept the loading of an image BEFORE it loads? We're looking at using an img tag for inserting stats on our server. Here's what I'm considering... 1) Collect certain information server side, write an img to the document like so (note the URL vars): <img id="statsImg" src="stats.cfm?somevar=someval" width="1" height="1" /> 2) Using JS, intercept the load of this image BEFORE it takes place, and add things to the URL vars. This way, if JS is not present, you get the default stuff, but if
[jQuery] dom ready takes very long in IE 8
I am hiding a login panel like: $(document).ready(function() { $("#login").css({marginTop: "-105px"}); }); But in IE 8 it takes very long to hide? I don't like to set it in CSS because if javascript is turned off people can still login as it is visible... is there anyway to make it faster ?
[jQuery] Compatibility Issues
I have a client using 1.1.4.js and we are using 1.2.6.min.js. If the client upgrades, will it break their 1.1.4.js code? Is there any way to tell? Thank you in advance, Ken
[jQuery] Question about jQuery's filter ability
I developed a fairly straightforward product filtering tool using Spry and was curious if jQuery could do something similar and if so where I might find an example. The tool can be seen here: http://www.bradygodwin.com/test/rnatoold.html Thanks!
[solved] appendTo(div) order
Good morning... So I've manipulated a few jquery scripts to get, more or less, an asynchronous comments form on a personal page (such as facebook). The example can be seen here: www.leerecs.com/lookin_downers Basically when I append a new comment to the page, it appends below all the other content. For example: I have the following comments.. 1. good site 2. bad site 3. neat site 4. ugly site Pending a new comment would go like this: 2. good site 3. bad site 4. neat site 5. ugly site 1. wow site
[jQuery] select all a elements whose class attribute does not contain 'myclass'
$('a[class*=myclass]') selects all a elements whose class attribute contains 'myclass', how do I do the opposite?
Animate automatically onload
I have a page that works like a slider and I use controls to do so. What I am trying to figure out is how can I load or slide to a specific cell. I was planning on using a URL parameter to this. Here is the code I am using for one of the controls: $("#right").click(function(){ $(".cellDec").css("display","none"); $(".block").animate({"left": "-=600px"}, "300", function (){ $("#cellCont .cell:first").appendTo("#cellCont"); var position = block.position();
[jQuery] UI dialog resize (width & height settings)
I had problem when try to reuse div element with ui.dialog(). If I set the width & height the first time it works; but if I call it from second function with different width & height it won't apply the new setting. Also if I manually resize the dialog when it appear after close and reopen it use the new size (resized manually) not the one I specified in the code. So my question is very simple is it possible to resize the dialog before it show up?
ability to auto-size/auto-position resizable/draggable div
Currently I am concerned only with IE7 (or greater). I am dynamically creating draggable/resizable div elements (divInner[x]) and appending those to a draggable parent div (divOuter). What I would like is: 1. each divInner[x] to have its resizable borders auto shrunk to fit the text or image that is contained within it. 2. each divInner[x] to be auto positioned within divOuter such that divInner[1].top = 0, divInner[2].top = (divInner[1].top + divInner[1].height), etc. Currently I can get 1 XOR 2.
[jQuery] IE iframe bug? Attributes not available on $(document).ready - any advice?
Hi all, I have a problem which is well over my JQuery/javascript head. I have a page (http://www.norabrowndesign.com/new_site/portfolio/ websites/index.html) in which you can click on any thumbnail and up pops an iframe, using the thickbox plugin. The iframe loads a new html document (for example http://www.norabrowndesign.com/new_site/portfolio/websites/ror/index.html). Now in *that* document, I have some jquery which calculates and sets some margins, based on the heights and widths of images (which
[jQuery] Mouse event problem
Hi, I need to make one of those mouse scrolling galleries that lets you change the direction by where your cursor is positioned. However, I'm starting to suspect this won't be possible using javascript. I have the main functionality worked out(see code below), but the problem I'm coming up against is when the mouseover/mouseout events are triggered. I've set the events to be triggered from the gallery container, but it seems like the mouse events are called everytime the cursor goes over any of the
[jQuery] New Plug-in: Marquee, an ESPN-style ticker...
My current employer (Giva, Inc) has released another jQuery plug-in today called the Marquee jQuery Plug-in. The jQuery Marquee plug-in converts a list element (<ul /> or <ol />) into an ESPN-style scrolling marquee. Messages are scrolled in from top or bottom (based on the yScroll option) and longer messages will then ticker to the left in order to show the full message. While there are a number of ticker/marquee style plug-ins, nothing did exactly what I needed. I really wanted something that would
[jQuery] [validator] how to turn off validation once it's turned on
Hi - I'm looking for a way to validate a form with two buttons. The first button will add the form's contents (if they're valid) to the row of a table below the form. (Several rows can accumulate in the table.) The second button will proceed to the next page if either 1) there's valid content in the form or 2) the table has at least one row in it. What I'm trying to figure out is if I can "turn off" the validator for the 2nd button when I add a row to the table, while keeping it active for the 1st
[jQuery] Newbie question about toggle.
Hello! I think very simple question, but I am very new to jquery... For example, I have the next code: $('#info').hide(); $('a#show_hide_info').click(function(){ $('#info').toggle(); }); So when a user click on #show_hide_info, #info element become visible or invisible. But the #show_hide_info element is placed on the top of the page and the #info element is on the bottom of the page. The bottom of the page isn't visible to the user because the page is too long. So when user clicks
[jQuery] Upload via jsonp and $.ajax
I read through a lot of forums and finally found a hint so solve my problem.. I try to upload some data ( an image ) to an external site ( works with an API Key and returns XML if Upload completed correctly ).. The code of my script can be found here http://pastebin.com/m1489e027.. Can anybody help me with this issue - at the moment i'm getting the following error message -- M.data.match is not a function -- and don't know how to handle ;(.. The external server excepts the following data: image (
[jQuery] can i use lightbox and thickbox on one webpage
Hello sir, i use asp.net 3.5 and i add thickbox and lightbox of jquery js on my page. but light box is not working. so please tell me can it possible to use both js on one webpage.
[jQuery] Cycle Plug-in - #nav a.activeSlide doesn't updated
Hello list, I am using the Cycle plug in by Mike Alsup (thank you for a great plug- in). I am using automatic auto-transitions with a pager to switch between images. Everything works fine, however the a.activeSlide class doesn't updates and switch to the current slide. You can view the file here: http://www.opendraft.com/strivenyc/ Any idea why it happens and how I can fix it? Thanks, Mor
[jQuery] css background-color not exists in IE with more then 2 classes..
Does anybody know why in IE: jQuery.css(e, "background-color");jQuery.css(e, "background-color"); Not works on a elementl like: <div class="directions rounded-big"> </div> But will work with.. <div id="directions" class="rounded-big"> </div>
[jQuery] Setting hidden field value in html
Hello, I have an hidden field in a form defined as follow: <input type="hidden" name="previewText" value="" /> To assign its value I used: var contentText = "<h2>Order Preview</h2>"; $("input[name='previewText']").val(contentText); It works fine but the html code is lost. Is there a way to retain the html format? Thank you
innerWidth not working on ul in forefox
I am trying to make a sliding gallery which can be seen here. The script requires innerWidth of the ul which doesn't have a width defined in the css. It works ok in ie6 but not in firefox. At them moment i am just putting in a number which gets it to work but if i add more pictures then it won't work
how to remove background-color from the row?
I have some data rows with alternate row color with following 2 CSS classes applied. 1. alt-1 2. alt-2 onMouseOver event of the row I replace the class "alt-2" and in onMouseOut event I replace the alt-1 back vice-verse. and, when the user select the checkBox of the row. I need the background to change to different color. I used the background-color property of CSS directly and done it. upto here works fine. My problem is, when user uncheck the check box I want to remove the background color from
[jQuery] Validate textbox on option selected value
Hi all, I have this validate code to validate a textbox if the user select a combo value: <script type="text/javascript"> $(document).ready(function() { $("form#2form").validate({ rules: { viaAltro: { required: "#AltraVia:checked" } }, messages: { viaAltro: { required: "Insert 'Altra via'" } } }) }); </script> and this is the HTML: <select name="viaFornitura" id="viaFornitura"> <option>Seleziona la via</option> <option id="AltraVia">Altro</option> </select> <label for="viaAltro">Altra
[jQuery] Onwidow resize element width
Hey i am trying to create a plugin that changes the css of a div according to size of window. I cant use a % based layout because it causes a gap in the layout that i dont like. a small description of the script would be something like this: windowwidth = 1000px calculation = 1000(windowwidth) - 300 (this is for columns) / 150(this is for child elemnts that fit div) = 4.66(answer from this sample data) if calculation = 4 (use integer only) then element width = 600px if calculation = 5 then element
[jQuery] Cannot modify properties of a WrappedNative
uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 834" data: no] Line 0 I get this sometimes from I don't know where... anybody had this problem before?
Greyed-out background overlay effect?
What's a simple way to add (and subsequently remove) the greyed-out background overlay effect? The effects documentation doesn't list an effect like this.
[jQuery] Set text property of server control
Hi, I am creating a dialog that has three asp.net buttons inside it. I want to change the text property of the buttons from jquery. I have tried the following code but it does not work. The text is not changed. //server control id=b1 var b1 = $("#<%=b1.ClientID %>"); b1.text("yes"); I have also tried b1 = $("[id$=b1]"); b1.attr("Text", "yes"); Can someone please tell me what I am doing wrong? King Regards Cecilia -- View this message in context: http://www.nabble.com/Set-text-property-of-server-control-tp23386712s27240p23386712.html
Next Page