jquery

How to get Checkbox status?

I have following html control in view: <%= Html.CheckBox("MyStatus", (item.MyStatus>0)?true:false)%> Then I want to get the value for this checkbox: if it is checked, return true, otherwise return false. I try it as below: $("#MyStatus").attr("checked").value but I can't get the right value. How to resolve it? ...

Disable click handler when click is fired in jQuery

We have a website built in .NET and jQuery. We have custom jQuery to call the load method on a processing ASP.NET page. That ajax call is fired in a click handler, e.g. $("#Submit").click(function(){ $(a_selector).load("Process.aspx?data=" + someDataObject, null, function(){ alert("Done")}); } return false; ); Our issue is w...

jquery adding to the last tr of the first table

Hello, I have a table structure like the one shown below: <table id="result"> <tr> <td id="groupx"> <table> <tr> <td>Data</td> </tr> </td> </tr> </table> I want to add a TD to the last tr of table result. Trying x.appendTo($("#result tr:last")); isn't working since it's adding to the last tr of a table id "group" Any suge...

My ActionScript's ExternalInterface callback function isn't going through. How can I debug it?

Help, please? It appears that my callback function isn't being called...back. I'm using jQuery, and Flash 8. To access the Flash object, I'm using the jquery swfobject plugin, c.f. (http://jquery.thewikies.com/swfobject/examples). If you think that I'm not accessing the SWF properly in the first place, please recommend code as to how I w...

JQGrid How do I removed the annoying horizontal scrollbar when autowidth = true? (In IE)

I seem to be getting an annoying horizontal scrollbar when using autowidth=true in IE What is going on here and how do I get rid of it? ...

jquery ui tabs problem

I want to show 'loading' when the tab is loading... cause the content is coming with ajax. Heres my code $('#tab').tabs({ spinner: 'Loading' }); The content comes just fine but it never shows "Loading"... at all Am I Blind or Im doign something wrong?... Have tried IE and Firefox. ...

Using JQuery to Iterate through elements with a timer

I am trying to use JQuery to iterate through a number of <li> objects using a timer, i.e. - for every 5 seconds, I would like to access the next <li> object of my <ul>. I know you can iterate using the .each function, but I am having trouble with integrating the timer with it to iterate through each one individually. I tried the follow...

using jquery, how to change an image when hovering links?

I have a list of links (a text menu), and I need to change an image in other area when each link is hovered... the images need to be showed in the same place, lets say a 100x100 area at right... any idea to achieve this? can each link have the src of the images? no idea how to do it :( ...

jQuery UI Resizable Plugin – Scaling a <div> AND the contents within?

Does anybody have a clue, if it's possible to resize a <div> and the content (here: images) within without using "alsoResize in combination with a class/id name". In other words: Is there a workaround for: $('DIV').resizable({ handles: 'se', alsoResize: 'ITS CHILDREN' }); or are just class/id names allowed for alsoResize? ...

Javascript replace function won't remove the string

I have no idea why this doesn't work, but doing some validation functions and trying to output a dynamic message to an alert when they hit submit and forgot to fill out a field. It works only on the second click of the submit button, as far as removing the string, everything else works when it should. Here's the code: var fname = $('#f...

ASP.NET and JavaScript dynamic show/hide based on other form fields

I seem to keep running into these complex show/hide scenarios in ASP.NET web forms where the logic goes "if Field A equals blah, and Field B equals blahblah, then Field C is shown/hidden/validated/whatever." Before I run off and start building custom validators and custom controls so I can more easily manage it in markup or backend code,...

Superfish dropdown issues

Here is my dilemma: I'm attempting to make my nav work for the site mobilityidaho.org. On the home page, there are no problems at all with superfish working properly. When you navigate to any other page, the CMS I am using launches a javascript file that attaches the class "selected" to the li's in my navigation. Superfish cannot handle ...

jQuery .toggle() works in FF but not IE

I have a simple vertical menu and I'm using the .toggle() function to expand/collapse the submenu. It works in FF and Safari, but not in IE. (none of the IE's) I also have a very simple "slideshow" function also using jquery, and it seems to be working in all browsers. Website is live: http://www.fastpartsauto.com Code: <script type=...

jquery html() not working

I have an input box created by jquery like so: val input = $('<input class="pick_date" ... />') but the .html() method on input does not return the string entered inside the $. does anyone know why? edit: Ah, I understand the problem. Is there a way to get the html representation of the entire input box and not just the entry? ...

JQuery Datepicker with generated DOM elements

I have a website that uses JQuery to construct a rather large table. When I try to select a set of input elements created this way by class and add a datepicker to them, nothing happens. The table is generated durinng document.ready(); is there a certain time I have to execute $('.date_pick').datepicker(); in order for this to work? I...

Rails, using jQuery without jrails

Hello all, I have been trying to convert my rails 2.2.2 app over to jQuery, and would like so without using jrails. The only reference material I can find on the subject is Railscasts Episode 136. Ryan goes over how to use jQuery to post a form and handle the response in a .js.erb file. My questions is has anyone tried to use jQuery w...

How do I skip the first iteration of an $.each()?

I have a JSON list that I want to iterate over, but skip the first entry, like thus: $.each( data.collection, function() { DoStuffButOnlyIfNotTheFirstOne(); } ); Any ideas? ...

Jquery Mouseenter/Mouse Leave image swap

Hey Guys, So I wrote this little bit of code to try out some new way of doing an image swap for purposes of preloading and I am having a bit of trouble. My problem is that I have a container with the images that has some padding and text, but the activation of my rollover only happens when someone rolls over the image, instead of the c...

jQuery Hover Fade Button with an Active State

The following scripting is a custom addition to this Hover Fade Button; in my version it keeps the text of the button while changing the background images through css classes only. Hover Fade Method I have able to everything except when you click on another button you get two active buttons and so on. I like the buttons to hover {span.h...

updating images in a ul list via jquery ajax

I have the following jquery code: jQuery(function(){ jQuery("select#rooms").change(function(){ var options = ''; jQuery.getJSON("/admin/selection.php",{id: jQuery(this).val(), ajax: 'true'}, function(j){ for (var i = 0; i < j.length; i++) { //what should go here? } }) }) }) from the serve...