jquery

Getting jQuery to recognise .change() in IE

I'm using jQuery to hide and show elements when a radio button group is altered/clicked. It works fine in browsers like Firefox, but in IE 6 and 7, the action only occurs when the user then clicks somewhere else on the page. To elaborate, when you load the page, everything looks fine. In Firefox, if you click a radio button, one table r...

jQuery: How to stop a helper from being removed if it wasn't successfully dropped.

I have a draggable with a custom helper. Sometimes the helper is a clone and sometimes it is the original element. The problem is that when the helper is the original element and is not dropped on a valid droppable it gets removed. My solution looks like this so far: in my on_dropped callback I set ui.helper.dropped_on_droppable to true...

Why does a checkbox remain checked in FF3 but not in IE, Chrome or ...

So - I have a checkbox <asp:CheckBox ID="chkOrder" runat="server" Visible='<%#IsCheckBoxVisible() %>' Checked="false" OnCheckedChanged="chkOrder_CheckedChanged" AutoPostBack="true" EnableViewState="false"></asp:CheckBox> the one above. Now, the checkbox is in a gridview and on databound - for all the rows in the gridv...

Django template with jquery: Ajax update on existing page

I have a Google App Engine that has a form. When the user clicks on the submit button, AJAX operation will be called, and the server will output something to append to the end of the very page where it comes from. How, I have a Django template, and I intend to use jquery. I have the following view: <html> <head> <title></title> <script...

best way to remove an event handler in jquery?

who knows the answer? i have a input type="image" which sort of acts like the little cell notes in excel. if someone enters a number into the textbox this input-image is paired with, i setup an event handler for the input-image and then when the user clicks the image they get a little popup to add some notes to the data. the problem i...

Good JavaScript IDE with jQuery support

I'm planning to start learning jQuery (among other things), so I'm looking for a good Javascript editor that can preferably provide some of the following features: Syntax coloring Contextual help for standard JS functions, jQuery functions and possibly custom ones Some code completion (optional) JS debugging Is there such an editor o...

jQuery - Live Validation Plug-ins

I'm looking for a plugin for jQuery that can validate as a key is pressed and after it loses focus (text boxes). I'm currently using jVal - jQuery Form Field Validation Plugin. It works pretty good. The only issue I have is that I can only use a generic error message. For example: I need a string to between 2 and 5 characters. If ...

How do I make a popup menu open in a diagonally using jQuery?

I need to make a mouseover menu that opens diagonally (from top-left to bottom-right). ...

JQuery: has a button been pressed again within so many milliseconds..

Hi, I'm writing a web application that decodes Morse Code that is tapped in using mouse button. I originally did a proof of concept using conventional JavaScript, but now I'm redoing it using jQuery. Is there a clever way with jQuery to tell if a button has been pressed again within so many milliseconds, or not - and run some jQuery c...

What are some JavaScript Unit Testing and Mocking Frameworks you have used?

My main JavaScript framework is jQuery so I would like my unit test and mocking frameworks to be compatible with that. I'd rather not have to introduce another JavaScript framework. I am currently using QUnit for unit testing and Jack for mocking, but I am pretty new to the whole unit testing of JavaScript. Does anyone else have a bett...

How do I prevent a jQuery Selector from including nested elements?

I'm new to jQuery so hopefully there is an easy answer to this. I have html similar to: <table id="dataTable"> <tr> <!-- I want this row --> <td>...</td> <tr> <tr> <td> <table> <tr> <!-- I do not want this row --> <td>...</td> </tr> </tab...

jQuery and jVal Validation Plug-in. Adding an attribute to an element.

I'm trying to add the jVal attribute to a textbox that I created in the HTML. <input id="subJobName" type="text" jval="{valid:function (val) { return validateSubJobName(val); }, message:'Name already exists or is longer than 14 characters.', styleType:'cover'}" /> I would let to add /set the jVal in the javascript instead. 2 reasons ...

jQuery multiple radio buttons

New to javascript/jquery and having a hard time with using "this" or "$(this)" to get the current object. I have a table with a set of radio buttons on each row, each named 's_'. None of the radio buttons are checked by default: <tr> <td align="left" style="width: 300px"> <div id="div_s_0"> <input type="radio" name="s...

Can I cancel postback when user presses return in a textbox?

I have a textbox whose input is being handled by jQuery. $('input.Search').bind("keyup", updateSearchTextbox); When I press Enter in the textbox, I get a postback, which messes everything up. How can I trap that Enter and ignore it? (Just to preempt one possible suggestion: The textbox has to be an <asp:textbox ... /> - I can't repla...

jQuery Thickbox or similar to show iFrame?

I have been looking at jQUery thickbox for showing modal dialogs with images, it is great. But now I have the need to display a hidden div of content that contains an iFrame in a similar fashion, with a link to open the content. So I'd have something like this. <a href="">Open window in Modal Dialog</a> <div id="myContent"> <h1>L...

What is the best way to center a div on the screen using jQuery?

The title says it all really. ...

How can I give control back (briefly) to the browser during intensive JavaScript processing?

I have read the post here about using setTimeout() during intensive DOM processing (using JavaScript), but how can I integrate this function with the below code? The below code works fine for a small number of options, but when the number of options gets too big my "please wait" animated GIF freezes while the local JavaScript is processi...

Access KML placemarks in a Google Maps overlay via Javascript?

I have a KML file overlay on an embedded Google Map using the GGeoXml object. I'd like to be able to access specific placemarks in the KML file from Javascript (for example to highlight a selected polygon on the map in response to user action). Ideally what I'd like to do is something like this (pseudo-code): geoXml.getPlacemarkByNam...

jQuery.ScrollTo / jQuery.SerialScroll Horizontal Scrolling

Hi, I am looking to implement horizontal scrolling using jQuery.SerialScroll (based on jQuery.ScrollTo). I currently have a continuous horizontal scrolling working with liScroll as I discuss in this post. However, now I need discrete scrolling and I have SerialScroll working perfectly for vertical scrolling. For some reason, if the '...

How do I use jQuery to insert a <DIV> wrapped around a variable number of child elements?

I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol> <li> <label>Some label</label> <one or more form controls, ASP.Net controls, labels, etc.> </li> <li> <label>Another label</label> <... more of the same...> </li> ... </ol> I'm trying to keep my markup as ...