jquery

jqGrid with an editable checkbox column

When using jqGrid how do you force a cell to load in its editable view on page load aswell as when it is clicked? If you set up 'cell editing' like below, the check box only appears when you click on the cell. { name: 'MyCol', index: 'MyCol', editable:true, edittype:'checkbox', editoptions: { value:"True:False" }, cellEdit:true, Al...

How do I target a jquery click function where identical links exist (ie within a php foreach)?

Similar to what Facebook does on its newsfeed, I want to allow commenting on numerous feed items, which I'm pulling via a php foreach statement. This is creating identical classes. So when I click .show_comments it activates everything. I went through SO and found something akin to what you see below...but it's not working for me. Ho...

How to pass a variable to webservice in $.ajax

I want to send a parameter to the webservice. The parameter needs to be a variable and not a fixed string.When I write the following code the webservice is called fine and is executed perfectly. $(document).ready(function() { $.ajax({ type: "POST", url: "JsonTestService.asmx/Test", data:"{'url':'http://www.cramster.com'}"...

ASP.NET MVC ModelBinder not working with GET requests and/or jQuery AJAX?

I seem to have a problem with getting MVC to fill in my custom model parameter when called through GET instead of POST. I have a JavaScript snippet that calls into an action like so: $.getJSON('<%= Url.Action("DoSearch") %>' + location.search, function(data) { if (data.Result == "OK") { location.href = location....

Dynamically arranging divs using jQuery

Hello, I have the following structure: <div id="container"> <div id="someid1" style="float:right"></div> <div id="someid2" style="float:right"></div> <div id="someid3" style="float:right"></div> <div id="someid4" style="float:right"></div> </div> Now someid is acually a unique id for that div. Now i receive an array which has a diffe...

How can I apply effects to retrieved elements within an array in jQuery?

I was wondering if it was possible to apply effects to retrieved elements within an array. I know I can output the contents of the array via the: .text() or the .html() functions in jQuery. But I have been trying to fadeIn() the content, and it never works. How can I accomplish this? ...

Join 2 'threads' in javascript

If I have an ajax call off fetching (with a callback) and then some other code running in the meantime. How can I have a third function that will be called when both of the first 2 are done. I'm sure it is easy with polling (setTimeout and then check some variables) but I'd rather a callback. Is it possible? ...

jQuery: Find the element before and after a specific element

I have a list with links I use with tabs. It looks like this: <ul> <li><a href="#">First tab</a></li> <li><a href="#">Second tab</a></li> <li class="active"><a href="#">Active tab</a></li> <li><a href="#">Fourth tab</a></li> <li><a href="#">Fifth tab</a></li> </ul> How can I find the list element before and after t...

[jquery] Implement + selector for IE6

Hi, I really like the + selector and don't want to add another css rule just for a IE6 workaround. So is there a jquery-way to check all existing css rules if it's using the + selector and to then modify the element. Something like this: if (IE6) for (var rule in $.cssrules) if (rule.selector.find('+')) $(rule).style = ru...

Open up first Fancybox picture automatically

Upon clicking on a link, I am bringing in some images from a JSON get, and then when clicking on one of the pictures can get the gallery to appear, but I would like the first image to appear straight away, as an event once the JSON has been loaded. Is this possible? My code is: $("#json-get") .css("cursor","pointer") .click(fun...

Is there a plugin to get jQuery.ajax to submit multipart/form-data?

I need this so I can submit a subset of form controls that contain non-ASCII text. The solution with an iframe element won't work for me because it submits the entire form; I only want to submit a subset of the controls. I know that I can build a multipart/form-data string myself, but it seems that this must have been done before... ...

MS MVC form AJAXifying techniques

I'm looking for most elegant way to ajaxify my forms (with jQuery). How do you do this? ...

jQuery Autocomplete images with options

Dear Techies, I am a newbie to jQuery.But really fascinated on it.Hats off to jQuery Team I have an aspx page where i want to implement an auto complete feature for a text box where user will type to search products.If they type,I wanto to show products with name a and their images to in the option.I have a DB table with 3 columns Pro...

when i click on this textbox it gets big but when i click away how do i make it go back to normal?

i'm basically mimicking the share button feature on facebook with jquery and what im trying to do is when i click on the textbox area the textbox gets larger by height. and when i click away it should get back to normal. with the last piece of jquery the code doesnt work at all. what are my options in getting this to work? thanks. ps: ...

jQuery iframe scroll event (IE)

Can't listen to the scroll event in Internet Explorer 7. I've tried: $("#myIframe").scroll(function() { alert('hi'); }) Works for FF: $($("#myIframe").contents().get(0)).scroll(function() { alert('hi'); }) Getting keypresses work: $($("#myIframe").contents().get(0)).keydown(function() { alert('hi'); }) ...

jQuery validation errorPlacement and removing elements?

Ok, I've tried a few things, but I'm stuck here... Here's the HTML I'm working with: <div class="required"> <label for="paysys_idworldpay" class="labelRadio"> <input type="radio" value="worldpay" name="paysys_id" id="paysys_idworldpay" class="inputRadio"/> <b>WorldPay</b></label> <label for="paysys_idoffline" class="labelRadio"> <input...

jQuery toggle animation

I have this jQuery: $(document).ready(function() { $("#panel").hide(); $('.login').toggle( function() { $('#panel').animate({ height: "150", padding:"20px 0", backgroundColor:'#000000', opacity:.8 }, 500); }, function() { $('#panel').animate({ height: "0", padding:"...

Is there a jQuery autogrow plugin for text fields?

I have a found various plugins for autogrowing a textarea, but not input text fields. Does anybody know if any exist? ...

Toggle not working in IE

Hey, I am using this code on my site: var panel = $('.couch-hide'); var originalPos = panel.css("right"); panel.toggle(function() {$(this).animate({right:0},1000, 'easeOutBounce');},function(){$(this).animate({right:originalPos},1000);} ); In FF it works flawlessly, but in IE, it doesn't pop out on click. Also, since im usin...

Using JQuery Validate Plugin to validate multiple form fields with identical names

I have a dynamically generated form with input fields with the same name (for example: "map"). I do not have the option of changing the field names or generating unique field names because the form handler code (Perl/CGI) is designed to handle an array of input values (in this case @map). How can I use the JQuery Validate Plugin to val...