jquery

jQuery: getting data from the $.getJSON() method

I'm writing a web application and need to initialize some parameters that I'm pulling via the $.getJSON() method. $.getJSON("../config/", function(data) { console.debug(data); } Now since these values will be used globally throughout the script and will not be triggering an event directly (which is the only implementation of $.g...

Advice "upgrading" from jQuery 1.2.6 to YUI 3?

I have a web application that is using both jQuery 1.2.6 and YUI 2.6.0 and I am thinking about upgrading one or both of these libraries. The current versions (as of this question) are jQuery 1.3.2 and YUI 3.0.0 (beta 1). The main reason for jQuery was the selector engine, and the main reason for YUI was components like TreeView and Dat...

Ajax Paging - Enable Back Button

Hello, I have a ASP.NET MVC implementation in which I get partial views via jQuery for things such as paging and filtering. The problem is though that I break the browser's back button by doing so. How can I restore back button behavior (rewrite the URL without refresh using pound? Not sure how that works though, and how to re-fetch data...

How does javascript evaluate arguments?

I write a simple javascript function to display a progressbar with the help of JQuery ProgressBar(http://t.wits.sg/misc/jQueryProgressBar/demo.php#) The progressBar function can be set to display different background images with different values. I want to display values in [0, MAX*0.3] as red, (MAX*0.3, MAX*0.7] as orange, and (MAX*0.7...

Fancybox and Validation JQUERY

Hi i have a form that uses JQUERY to send an email containing name and email.. Im just wondering why on the first attempt the validation works but if you submit it again.. it doesnt refresh the validation and in addition, the fancybox that im using looks it getting an infinite loop and i can close the box anymore.. any solution or somet...

Jquery switching between several images on click

Hi, I'm trying to use jquery to switch between three images once you click on the image. Upon clicking on the third image, it switches it back to the first picture. Is there a way to adapt the following to switch between more than two pictures, and for it to allow more than it switching once? $(document).ready(function() { $("#clic...

Jquery browser-compatibality issue, what am I doing wrong?

Hello SO Gus, Here's another problem. I'm using JQuery-1 to add a simple interactivity to one of my pages. In short, the page contains a search text box at the top right, on document.ready I simply call an inputHint() function that adds the phrase "search products" to my textbox. When the user clicks this textbox, I call another functio...

How to trigger a repeated event by mouse hovering in JQuery?

Hi All! I was building a simple carousel list for learning purpose. In some carousel samples, if u hover muse on the prev or next button, the list starts scrolling, as if a repeating click event was being passed to the prev and next buttons. Now, in my carousel, i have prev and next buttons that will slide up and down the list. Now i ...

Variable speed of response with jQuery Ajax requests

When I perform an asynchronous request with jQuery Ajax, sometimes the response is returned quickly in 800 ms, somtimes it's slow and the response is returned in 2.50s (avg), and sometimes it hangs, and just shows the loading images. I'm not sure if it's because of my PHP code or jQuery Ajax code. I send some values using jQuery Ajax: ...

Capturing "Delete" Keypress with jQuery

Hello, When using the example code from the jQuery documentation for the keypress event handler, I'm unable to capture the "Delete" key. The snippet below is going to log "0" when the Delete key is pressed in FireFox: $(document).keypress(function(e) { console.log(e.which); }); Seems there's gotta be a way to capture the delete ...

Detecting/handling changed data in ASP.NET MVC / jQuery / JS

We need to universally handle changed data on forms in ASP.NET MVC. Our application has ~100 forms, and the user should be prompted if they start editing a form and click on anything other than Save (i.e. something like "Your data has been changed. Click OK to return to the form, or Cancel to lose all changes."). It looks like SO im...

jquery hover mouse out

I want a simple slide down / up animation on a mouse over of a link can get the mouse over to work but can't work out how to get the mouseout to do it's thing here's what i have for the hover effect <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery...

jquery html creating multiples of the same form

I am using ASP.NET MVC, Partial Views and Dialogs. I make a ajax request to the server and it hands me back a partial view. Then I use: $('#elementTag').html(returnData) to refill the bounding div's. However, this partial view contains the inner working for a dialog wrapped in a form element along with the rest of the partial view conten...

After JQuery slideUp() finishes the rest of the content jumps into place

I'm trying to do a simple JQuery slideUp of an information message. The problem is that the message slides out cleanly and the animation looks great, but the div below the one I'm sliding out stays put until the animation is done, then just jumps into place. I want the following div to slide up as my message disappears. I've tried chang...

jQuery Datepicker - Multiple instances and disable previously selected dates?

I have a page where the user can select three different appointment days using the jQuery UI Datepicker. When the user selects a day in the first field, I would like that date blocked out from the other two fields. I currently am also disabling Sundays, but cannot get dynamic date disabling working. Appointment Time 1<br /> <input i...

Jquery Show Current Page in Navigation Sliding Doors

I'm currently building www.scenes-online.co.uk/test/ I've got this code sliding up and down the links on hover using jquery... <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery", "1.3.2"); //load version 1.3.2 of jQuery google.setOnLoadCallback(fun...

JavaScript - How do I make sure a jQuery is loaded?

Hello, I have a web page. When this web page is loaded, I want to execute some JavaScript. This JavaScript uses JQuery. However, it appears that when the page is loaded, the jQuery library has not been fully loaded. Because of this, my JavaScript does not execute properly. What are some best practices for ensuring that your jQuery lib...

How to create a jQuery plugin with methods?

Hi, I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have been browsing for the past 2 hours) include, at the most, how to add options, but not additional functions. Here's what I am looking to do: //format div to be a message container by c...

show and hide div every 1min

How to show and hide div every 1min in jquery ...

Two jQuery versions on the same page

Hi Is it possible to have 2 different jQuery versions in the same document, and have them to not collide with each other? For example if I create a bookmarklet and want to base the code on jQuery. This bookmarklet is injected on some page that uses another version of jQuery then my code would overwrite the version used on the page. Is...