Questions tagged [jquery]
jQuery is a JavaScript library. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations, and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jQuery should be related to jQuery, so jQuery should be used by the code in question, and at least jQuery usage-related elements must be in the question. Consider also adding the JavaScript tag.
jquery
1,038,061
questions
12
votes
10
answers
26k
views
How do you fix the flickering that occurs when you use slideToggle in jQuery?
I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a ...
12
votes
12
answers
6k
views
What are jQuery's limitations?
Joel always said to be careful when using 3rd party libraries. From my initial impressions, jQuery is great. What should I beware of when using it? What are the limitations? What headaches will I ...
21
votes
2
answers
35k
views
Auto-format structured data (phone, date) using jQuery plugin (or failing that vanilla JavaScript)
I like jQuery and I was wondering if anyone have used a good plugin or (non-jQuery) JavaScript library that allows for auto-formatting of structured fields like phone numbers or dates. I know of the ...
14
votes
6
answers
31k
views
Use jQuery to replace XMLHttpRequest
I am quite new to JavaScript libraries. I wanted to replace my current code with jQuery. My current code looks like this:
var req;
function createRequest() {
var key = document.getElementById("...
20
votes
6
answers
25k
views
jQuery Menu and ASP.NET Sitemap
Is it possible to use an ASP.NET web.sitemap with a jQuery Superfish menu?
If not, are there any standards based browser agnostic plugins available that work with the web.sitemap file?
21
votes
8
answers
64k
views
Building an HTML table on the fly using jQuery
Below is the code I use to build an HTML table on the fly (using JSON data received from the server).
I display an animated pleasewait (.gif) graphic while the data is loading. However, the graphic ...
62
votes
14
answers
26k
views
Automated unit testing with JavaScript
I'm trying to incorporate some JavaScript unit testing into my automated build process. Currently JSUnit works well with JUnit, but it seems to be abandonware and lacks good support for Ajax, ...
34
votes
5
answers
76k
views
JQuery error option in $.ajax utility
The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the ...
99
votes
8
answers
122k
views
Can jQuery read/write cookies to a browser?
Simple example: I want to have some items on a page (like divs or table rows), and I want to let the user click on them to select them. That seems easy enough in jQuery. To save which items a user ...
10
votes
3
answers
47k
views
jQuery create select list options from JSON, not happening as advertised?
How come this doesn't work (operating on an empty select list <select id="requestTypes"></select>
$(function() {
$.getJSON("/RequestX/GetRequestTypes/", showRequestTypes);
}
...
176
votes
17
answers
125k
views
Best cross-browser method to capture CTRL+S with JQuery?
My users would like to be able to hit Ctrl+S to save a form. Is there a good cross-browser way of capturing the Ctrl+S key combination and submit my form?
App is built on Drupal, so jQuery is ...
590
votes
32
answers
329k
views
jQuery/JavaScript to replace broken images
I have a web page that includes a bunch of images. Sometimes the image isn't available, so a broken image is displayed in the client's browser.
How do I use jQuery to get the set of images, filter it ...
35
votes
5
answers
71k
views
jQuery attribute selectors: How to query for an attribute with a custom namespace
Suppose I have a simple XHTML document that uses a custom namespace for attributes:
<html xmlns="..." xmlns:custom="http://www.example.com/ns">
...
<div class="foo" custom:attr="bla"/...
4
votes
2
answers
1k
views
Queuing actions (not effects) to execute after an amount of time.
What I'd like to know is if there is a nice way to queue jQuery functions to execute after a set amount of time. This wouldn't pause the execution of other functions, just the ones following in the ...
1
vote
1
answer
1k
views
How can I reimplement external pop-up jQuery code in Prototype?
I have this code in jQuery, that I want to reimplement with the prototype library.
// make external links open in popups
// this will apply a window.open() behaviour to all anchor links
// the not() ...
4
votes
6
answers
29k
views
A sample for jQuery based WYSIWYG Editor demonstrate OOP javascript
Want a WYSIWYG jQuery Editor as an example to illustrate how to use jQuery to built OOP javascript component.
P.S.
It is so good stackoverflow can use markdown... Would be a heaven if users would ...
-2
votes
4
answers
6k
views
tagName is null or not an object -- error msg in IE7 using latest version of jQuery (1.2.6) [closed]
has anyone else seen this error message. a quick check with google doesn't show me much.
71
votes
6
answers
97k
views
Is there a better way to create an object-oriented class with jQuery?
I use the jQuery extend function to extend a class prototype.
For example:
MyWidget = function(name_var) {
this.init(name_var);
}
$.extend(MyWidget.prototype, {
// object variables
...
4
votes
2
answers
281
views
forms and jQuery
I'm creating a simple form for a site I manage. I use jQuery for my JavaScript. I noticed a large amount of plugins for jQuery and forms. Does anybody have any favorites that they find especially ...
11
votes
3
answers
27k
views
Unable to receive JSON from JQuery ajax call
I have determined that my JSON, coming from the server, is valid (making the ajax call manually), but I would really like to use JQuery. I have also determined that the "post" URL, being sent to the ...
7
votes
6
answers
3k
views
How to select consecutive elements that match a filter
Given this example:
<img class="a" />
<img />
<img class="a" />
<img class="a" id="active" />
<img class="a" />
<img class="a" />
<img />
<img class="a" /&...
42
votes
9
answers
28k
views
Javascript framework calendar plugin [closed]
Does any know of a good calendar (not datepicker, but a BIG browsable calendar) plugin for one of the major javascript frameworks. I'd prefer jQuery.
16
votes
4
answers
32k
views
How to make jQuery effects run in sequence, not simultaneously?
How do I have two effects in jQuery run in sequence, not simultaneously? Take this piece of code for example:
$("#show-projects").click(function() {
$(".page:visible").fadeOut("normal");
$("#...
0
votes
2
answers
3k
views
In jQuery, using ajaxSend to preview the url built by $.post call
How can I construct my ajaxSend call, this seems like the place to put it, to preview what is being passed back to the broker? also, can I stop the ajax call in ajaxSend?..so I can perfect my url ...
6
votes
4
answers
5k
views
How to display the progress of a server script in jQuery?
With this code I can show an animated gif while the server script is running:
function calculateTotals() {
$('#results').load('getResults.php', null, showStatusFinished);
showLoadStatus();
}
...
0
votes
4
answers
4k
views
JS error for JQuery in IE 8.0
I have developed a simple page using JQuery. It works fine in almost all browsers (i.e. Firefox, IE, Chrome) but whenever the page is opened in IE, it prompts Javascript error like,
'guid' is null or ...
0
votes
3
answers
5k
views
Best Refactor to Handle Multiple jQuery Email Field Form Validation
What is the best way to refactor the attached code to accommodate multiple email addresses?
The attached HTML/jQuery is complete and works for the first email address. I can setup the other two by ...
444
votes
25
answers
970k
views
How to show loading spinner in jQuery?
In Prototype I can show a "loading..." image with this code:
var myAjax = new Ajax.Request( url, {method: 'get', parameters: pars,
onLoading: showLoad, onComplete: showResponse} );
function ...
4
votes
5
answers
5k
views
How do I use Javascript to locate by X-Y Coordinates in my browser?
I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they need to do, and then come back to the pages w/ links, they are at the same (x-y) location in the browser ...
58
votes
14
answers
144k
views
Apple Cover-flow effect using jQuery or other library?
Does anyone know how to achieve the cover-flow effect using JavaScript to scroll through a bunch of images. I'm not talking about the 3D rotating itunes cover-art, but the effect that happens when ...
19
votes
18
answers
42k
views
What advantages does jQuery have over other JavaScript libraries?
I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and/or YUI. What are some convincing advantages I can use to convince them?
19
votes
7
answers
11k
views
Google Maps style scrolling anyone?
I am looking for some JavaScript plugin (preferably jQuery) to be able to scroll through an image, in the same way that Google Maps works.
I can make the image draggable but then I see the whole ...
1
vote
13
answers
7k
views
How do I rotate an image at 12 midnight every day?
I need to rotate an image at 12 midnight every day from a group of 5-10 images. How can I go about doing this with JavaScript or jQuery or even PHP?
11
votes
2
answers
27k
views
Using jQuery, how can I dynamically set the size attribute of a select box?
Using jQuery, how can I dynamically set the size attribute of a select box?
I would like to include it in this code:
$("#mySelect").bind("click",
function() {
$("#myOtherSelect")....
12
votes
9
answers
2k
views
Any downsides to using ASP.Net AJAX and JQuery together
We are planning to use the jQuery library to augment our client side JavaScript needs.
Are there any major issues in trying to use both ASP.Net AJAX and jQuery? Both libraries seem to use $ for ...
1
vote
3
answers
581
views
jQuery: JFrame plugin fails in IE 7
I'm using the JFrame plugin with jquery 1.2.6.
It works fine in FF3, however it won't display the requested pages in IE 7.
The jQuery library and the JFrame plugin are called in the included header....
0
votes
3
answers
991
views
using load() to load page that also uses jQuery
I'm trying to load a page that is basically an edit form inside a
dialog (ui.dialog). I can load this page fine from an external (I'm
using asp.net) page.
The problem is that inside of my "popup" ...
6
votes
2
answers
9k
views
Figure out div that is visible out of four divs
I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time.
This is what I have that works so far:
$("#FeatureImage1:...
14
votes
4
answers
24k
views
MVC.net jQuery Validation
After trying to avoid JavaScript for years, Iv started using Query for validation in MVC asp.net, as there does not seem to be an official way of doing validation, Iv been surprised how good jQuery is....
0
votes
2
answers
2k
views
What are the CSS secrets to a flexible/fluid HTML form?
The below HTML/CSS/Javascript (jQuery) code displays the #makes select box. Selecting an option displays the #models select box with relevant options. The #makes select box sits off-center and the #...
11
votes
5
answers
24k
views
Which jQuery plugin should be used to fix the IE6 PNG transparency issue?
Is there an IE6/PNG fix that is officially developed by the jQuery team?
If not which of the available plugins should I use?
2
votes
2
answers
8k
views
access $(this) with href="javascript:..." in jQuery
I am using jQuery. I call a JavaScript function with next html:
<li><span><a href="javascript:uncheckEl('tagVO-$id')">$tagname</a></span></li>
I would like to ...
7
votes
7
answers
961
views
What are the best strategies for using multiple AJAX libraries?
What experience can you share about using multiple AJAX libraries?
There are useful features in Prototype, some in jQuery, the Yahoo library, etc. Is it possible to include all libraries and use what ...
15
votes
4
answers
6k
views
How do I stop an effect in jQuery
I have a page that uses
$(id).show("highlight", {}, 2000);
to highlight an element when I start a ajax request, that might fail so that I want to use something like
$(id).show("highlight", {color: ...
93
votes
9
answers
10k
views
How do you get JavaScript/jQuery Intellisense Working in Visual Studio 2008?
I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jQuery 1.2.6, but intellisense will not work in a separate jscript file. I have the jQuery ...
118
votes
17
answers
117k
views
Remove all classes that begin with a certain string
I have a div with id="a" that may have any number of classes attached to it, from several groups. Each group has a specific prefix. In the javascript, I don't know which class from the group is on the ...
4
votes
2
answers
3k
views
How can I determine why a jQuery ajax $.post request wasn't successful?
I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong?
xmlRequest = $.post(...
3
votes
4
answers
5k
views
Javascript array with a mix of literals and arrays
I can create the following and reference it using
area[0].states[0]
area[0].cities[0]
var area = [
{
"State" : "Texas",
"Cities" : ['Austin','Dallas','San Antonio']
...
1
vote
3
answers
15k
views
AJAX dropdowns (HTML Select) in Firefox with jQuery
Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from ...
10
votes
1
answer
14k
views
jQuery and Java applets
I'm working on a project where we're using a Java applet for part of the UI (a map, specifically), but building the rest of the UI around the applet in HTML/JavaScript, communicating with the applet ...