jquery

Where to use jQuery.noConflict

I have some code I was given in jQuery and I am really new to it. I need to use the jQuery.noConflict() method because I am using a Mootools framework as well. I just don't know where I should replace the $ symbols in the code for 'jQuery'. Any help would be greatly appreciated! The code for it is at www.cshellarchitecture.com/test/j...

Date Regular Expression

Hi all, I'm using a date field checker but I want to change the regex from DD-MM-YYYY to DD/MM/YYYY but I can't seem to get it working.. Here's the snippet of code: "date": { "regex": "/^[0-9]{1,2}\-\[0-9]{1,2}\-\[0-9]{4}$/", "alertText": "* Invalid date, must be in DD/MM/YYYY format" }, I'm sure it's quite simple but I have no i...

Jquery atrr + 2D array issue

Hello , i have the following script and i can't find out how to use the value inside car[0]['img'] inside this $('#img2').attr('src',car[0]['img']); im a JS noob so please explain me .. why jquery wont accept the 2d array as string value and run the function , and whats the possible solution of my problem ? var id = 0 ; var car ...

Jquery UI - Sortable add class on update

Hi, I'm using jqueries UI sortable plugin with 2 connected lists. I'm trying to get sortable to add a certain class to the li when it is dropped into certain uls. So depending on the ul it goes to, I want it to remove the old class and add a new different class which will be ul dependent. For example: I have a complete list and a arch...

Fade out jQuery menu after delay

I'm working on a jQuery drop-down menu that fades in when you hover on the top-level items. I want to set it so that when you move the mouse away the menu doesn't disappear instantly. I have this code: $(document).ready(function(){ $('ul#menu > li').hover( // mouseover function(){ $(this).find('>ul').fadeIn('fast'); ...

how do you pass an array string[] to a Web Service via Jquery?

here's my code: var ids = $.map($("#container-1").children(), function(n, i) { return n.id; }); $.ajax({ type: 'POST', url: 'Loader.asmx/Active', data: "{'divs':'" + ids + "'}", contentType: 'application/json; charset=utf-8', dataType: 'json', success: function(msg) {} }); ...

jQuery ajax success anonymous function scope

How do I update the returnHtml variable from within the anonymous success function? function getPrice(productId, storeId) { var returnHtml = ''; jQuery.ajax({ url: "/includes/unit.jsp?" + params, cache: false, dataType: "html", success: function(html){ returnHtml = html; } }); return returnHtml; } ...

jquery/javascript alert if all fields are not completed

Hi all, I have a form which I'd like to alert people if ALL of the fields aren't completed. I am currently using a jquery validation script for the required fields, but I need it to also let people know that not all of the fields are filled out before saving (they're not required fields, but just to let them know that the form isn't fini...

How to modify STYLE attribute of element with known ID using JQuery

Hello I got 3 buttons-links triggering some javascript code, with indication if certain button is selected, selected button got style attribute set to "btn brown selected" while other buttons got this attribute set to "btn brown" only one button can be selected at one time, each of buttons got different unique id, my question is ...

How do I use JQuery to access and loop through all drop-downs of a specific class?

Have a potentially infinite collection of drop downs, giving them all the same class, need to be able to access, loop through, and collect the selected value on the option of all the drop downs regardless of how many there could be. The final form should be something like 5,6,7,6,4,2,3,4,3,4 as a comma delimited list of the selected valu...

jQuery Captcha type script

Anyone have suggestions for creating an extremely simple form verification field using jquery? I need to block basic form spam. Would love to have some type of 1+1= field that us used to make sure it's a human submitting the form. I don't have the abilty to put .php or .asp on the site so it would need to rely on jquery or some other met...

How do I bind a javascript event handler to the Ajax Control Toolkit combobox when textbox changed

I need a combobox for an ASP.NET project, so I decided to use the Ajax Control Toolkit combobox (http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx). I don't want to use the postback as I don't want the page reloaded, but I need to know when the text in the textbox is changed so I can call out to the server to per...

How can I close a jQuery UI dialog after a x seconds?

How can I programmatically close a jQuery UI dialog after some number of seconds? I figure I need to do something inside window.setTimeout(function() { //Something here.... }, 10000); ...

SVG image sprites? Possible or not?

Has anyone ever used SVG for image sprites? I wish to replace a bunch of very similar GIFs and JPGs with some scalable SVG images, but the image gradient and button shape specifications bloat out the SVG. If I could create a composite diagram, then I might be able to reuse the gradients and base button shapes etc. I'm just not sure whe...

JS: Setting background-image with .click event is lagging 1 click behind the carousel image.

Hi, I have got the following code which reads the div.photo.active element's image src attribute, writes it to a variable which then should set it as the (tiling) background image of another div container. All of this works well however when clicking on the a.next and a.prev button to trigger the display:block & display:none states o...

Serialize the array

I have called serialize on array inputColl.serialize(); How to loop to it and print values? ...

what is the slickest way you have seen with respect to tag editing.

i have a list of tags on a website next to each link and i want to allow users to edit this list (add, remove, modify) i want to come up with a slick way so they can do this without it feeling klunky so things like autocomplete, ajax without going to the server, etc have you seen any examples of really sleek ways of supporting this. m...

How to make only limited letters can be typed into <input type="text" /> with jQuery?

For example,to allow only digital numbers to be typed in: <input type="text" id="target" /> ...

print value of check box

i have 10 check box. I want to capture in array and print value as the user checked checkbox. if he uncheck, value should be unprinted. ...

jeditable textbox width

is there anyway to make the textbox bigger than the text when using inline replace with jeditable. I want to give the user room to add new text on top of the existing text. ...