jquery

How to change alt attribute of an image several times with jQuery?

This question completes the first one that I asked here about how to change an image on click using jQuery. I forgot to say (even if I edited my post later) that I'm looking for a way to have a different alt attribute each time an image is changed by click. (This is for better accessibility and SEO optimization.) Here is the actual ht...

How can I simulate an anchor click via jquery?

I have a problem with faking an anchor click via jQuery: Why does my thickbox appear the first time I click on the input button, but not the second or third time? Here is my code: <input onclick="$('#thickboxId').click();" type="button" value="Click me"> <a id="thickboxId" href="myScript.php" class="thickbox" title="">Link</a> It...

Please recommend a JQuery plugin that handles collision detection for draggable elements.

We're using the Draggable JQuery UI plugin and need to disallow overlapping among our elements. We could write some collision detection ourselves but would prefer to use a tested package. Any suggestions? ...

jQuery is adding servlet name twice to URL

I am trying to complete the tutorial at http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=438 It seems that the servlet is trying to POST the data to http://localhost:8080/WeatherServlet/WeatherServlet ... (WeatherServlet is the name of the servlet - duh). I have the following index.jsp page (which displays fine) <%@ page l...

Stop browser from jumping to #name when page loads

I have a form in a jQuery dialog box named "login". In JavaScript, I detect if "#login" is in the URL -- if so, it displays the login dialog box. In FF/Safari/Chrome it works fine, but in IE6/7 the browser page jumps down to the top of the form when the dialog box is displayed. I would like to prevent this from happening. I found what l...

jQuery .getJSON function needs to rebind returned data.

I am having trouble getting my modal window function to bind to some returned data. I am using Cody Lindy's Jquery.DomWindow plugin. Please note that everything functions properly, except for this problem. The problem occurs when the data that is returned from my jQuery.getJSON call contains a link that is supposed to open up the modal ...

jQuery Plugin development help

Hello jQuery Gurus, This is my first attempt at a plugin but I think I'm missing the whole "How to" on this. Ok here goes: Trying to write an error popup box for form validation. I like the look and functionality on this JavaScript code on this page, See demo here and source here. It's basically what I want to do if the user enters ...

Vista Sidebar Widget + jQuery = Problems with the flyout.

I've created a Vista sidebar widget that uses jQuery to fetch XML and display some basic details of the XML response in the main HTML of the gadget (a date for an event). However, I'm having a devil of a time getting the flyout page to work correctly (or at all) to display the details once the user clicks on a link. Since I'm passing t...

How to select table cells without selecting nested table cells in jQuery

I want to select only the first level of 'td' elements in a table and not the cells of any nested tables. eg: <table id="Outer"> <tr> <td> --this one </td> <td> --this one <table> <tr> <td></td> -- but not this one or any deeper nested cells <...

jquery toggle effect resetting element width

For some reason when i use the jquery toggle function with a speed option, the element width is animated at the same time (from 50% of the width to its full extent). I don't recall noticing it in previous version of jquery. Is there a way to make sure the toggle doesn't touch the width? The problem is that i have some floated content in ...

jquery hidden preload

Here is my page http://equipe94.com/2009e.html there is some tweek that append to the page (scroller and arrows)and some positionning Do you have a way, to completely hide everything (just keep the background).. do the things , and show up the finished page ? ...

Jquery offline preload

Here is my html page http://equipe94.com/2009e.html I do somee tweek to the page, and it make the page reposition (scroll and arrow) Do you have a method that hide everything (except the background), do the thing that make the page shift, and show everything now at the right place ...

How do i make an area unclickable with CSS?

Let's say if I have wrapper div which includes some links and images, is there any way I can deactivate it at once with CSS only? // after review of answers I dropped the idea that can make it with CSS only. jQuery blockUI plug in works like charm. Thanks a lot. ...

Jquery Functions for operations on gridview with checkboxes

Hi all, The first column in my gridview (gvAvailable) is a currently checkbox column "chkSelect". The way it works now is that a user can check multiple checkboxes on a gridview, but I would like a jquery function to deselect all the checkboxes on the gridview except for the checkbox that was clicked. I was also looking for a way to ac...

[Beginner] JQuery reusable functions

Completely new to JQuery so I am learning everyday. One thing I noticed is how easy it is, you can just write $('div#test).remove(); But I am looking for an example on how to reuse some code, eg.: function RemoveTableRow(row, id) { $(row).remove(); // id should be used for ajax call } And then add a 'onclick' on my anchor-...

jquery :empty but ignoring text nodes

say my markup is: <ul> <li id="num1">hello</li> <li id="num2"><p>hello</p></li> <li id="num3">sdf dfg</li> <li id="num4"></li> <li id="num5"><a>linky</a></li> </ul> how do I query the ul to return #num1, #num3 and #num4 (the ones with no child tags)? something like: $('ul').children('li:empty') however from the...

jQuery Validation With Masterpage in asp.net

i have a childpage.aspx in masterpage and i am trying to validate required field in childpage through masterpage, the following code i have write in masterpage to validate $(document).ready(function() { var container = $('#sam586'); $("#aspnetForm").validate( { e...

jquery use a datepicker on more pages

Hello, I have this in my javascript file: $("#birthdate").datepicker({ changeMonth: true, changeYear: true, altFormat: 'dd-mm-yy', altField: '#birthdate', }); I have various pages which have fields that need a datepicker. Sometimes even more then one datepicker on a page. How can I be sure that this is also going to ...

IE7 & 8 not fireing jQuery click events for elements appended inside a table

I have an IE bug that I'm not sure how to fix. Using jQuery I'm dynamically moving a menu to appear on an element on mouseover. My code (simplified) looks something like this: $j = jQuery.noConflict(); $j(document).ready(function() { //do something on the menu clicks $j('div.ico').click(function() { alert($j(this).parent().ht...

Refactoring many JQuery Ajax calls - best practice?

I have a lot of JavaScript/ JQuery code blocks to handle asynchronous data processing in my page. Each code block has three functions (code is incomplete and for illustrative purpose only): encapsulates $.ajax call: function doSomething(data){ // do some preprocessing $.ajax({}); // some JQuery Ajax operation that accepts dat...