I need to only find the cells in the table which contain using jQuery.
<table>
<tr>
<td> </td>
<td>Something</td>
<td>something else</td>
<td> </td>
</tr>
</table>
Any ideas?
...
I'm using jQuery with the validators plugin. I would like to replace the "required" validator with one of my own. This is easy:
jQuery.validator.addMethod("required", function(value, element, param) {
return myRequired(value, element, param);
}, jQuery.validator.messages.required);
So far, so good. This works just fine. But what I...
The code expands and collapses a list in which list items can have sublists. Any ideas to refactor this code - especially the toggling part. Is it necessary to use closures here ?
$(function()
{
$('li:has(ul)')
.click(function(event){
if (this == event.target)
{
var that = this;
$('li:ha...
Hi, I need to hide a DIV partially, not totally. When page loads, I want it to show the first, let's say, 100 pixels sitting on the uppermost part of the div. When the user clicks a certain button, the div will open (it could be a sliding effect like jQuery's show()). When the user clicks back the same button, the div will return to its ...
you have several links on a page. when clicked, a div gets updated via ajax. the updated div includes data from the database.
according to this scenario, every time a link is clicked, the date is grabbed from the database and injected into the div.
would you now;
1) support this scenario or...
2) would load each link's content in sev...
If you have a recursive structure, say, child tables located inside td cells of parent tables, how best to traverse/select a particular parent table? For example, what if you wanted to find the next table up, or the 2nd table up?
One way might be to put something like this in a loop:
//Get the next parent up.
$parentTable = $table.pa...
In javascript, what is the best way to parse an INT from a string which starts with a letter (such as "test[123]")? I need something that will work for the example below.
My JS:
$(document).ready(function() {
$(':input').change( function() {
id = parseInt($(this).attr("id")); //fails for the data below
alert(id);
}...
Is it possible to replace exact text with other text after the page has loaded with jquery?
For example, my data is being generated dynamically within a php loop. Once it finishes outputting the information, I'd like to do a find and replace, replacing the phrase "test phrase 1" with "test phrase 2" throughout the page. Is this possibl...
As the question says, what are some good examples (or just examples really), of Jquery using JSONP to talk to a .net page or webservice?
I'm attempting to write a page which uses JQuery to call another website (Thus I need to use JSONP) which hosts the webservice/webpage (either is fine), and I can't find a good example of this.
...
Hi, I have several nested div elements like this:
<div class="main">
blah blah blah <div class="clickme">clickme</div>
</div>
<div class="main">
bleh bleh bleh <div class="clickme">clickme</div>
</div>
<div class="main">
blih blih blih <div class="clickme">clickme</div>
</div>
I want to fire a toggle event that will show/hide the di...
Hi... I have made a simple accordion for my site using jQuery... It worked great, but I've recently started working on a change where if you click the currently opened segments title (the clickable area to slide up/down), it should close the current section.
var sideMenu = {
activated: {},
setup: function() {
$('...
I have 4 images, which I want to fade between each other in a loop. I have something like the following:
<img src="/images/image-1.jpg" id="featureImg1" />
<img src="/images/image-2.jpg" id="featureImg2" style="display:none;" />
<img src="/images/image-3.jpg" id="featureImg3" style="display:none;" />
<img src="/images/image-4.jpg" id="f...
Any suggestions on which HTML template library would go well with JQuery? Googling turns up quite a number of libraries but I'm not sure whether there is a well recognized library that would stand the test of time. Thanks in advance.
...
A web page displays the following:-
Bob
Fred
John
However when the user (that would be me) prints the web page I want multiple repeats of this output with slight variations to be printed on separate pages :-
Bob
Fred
John
>page break here<
Bob
Fred
John
>page break here<
Bob
Fred
John
In reality the page content is larger...
How can I do that, so whenever a user clicks a link we play a sound? Using javascript and jquery here.
...
referring to my previous question I came accross to another problem. The div I am showing includes links in it. When I click on them, the div disappears as expected but not as desired.. (we want it to disappear whenever we click on anywhere on page... but the links inside them)
the code currently being used:
$.listen('click', '.tab...
I have been looking at OpenLaszlo and observed that scripting in the client is implemented in JavaScript. Does this mean it is possible to use libraries like JQuery and PrototypeJS ?
...
Can jquery test an array for the presence of an object (either as part of the core functionality or via an avaible plugin).
Also, I'm looking for something like array.remove, which would remove a given object from an array. Can jquery handle this for me?
thanks,
-Morgan
...
I am using the jquery tablesorter plugin to sort a table. On of my the columns in my table shows the date in mm/yy format.
<tr>
<td class="col-name">...</td>
...
<td rel="2000" class="col-dob">10/00</td>
...
</tr>
<tr>
<td class="col-name">...</td>
...
<td rel="1986" class="col-dob">11/86</td>
...
</tr>
...
Hi,
Several of my pages use both JQuery and Protoype. Since I upgraded to version 1.3 of JQuery this appears to be causing problems, because both libraries define a function named '$'.
JQuery provides a function noConflict() which relinquishes control of $ to other libraries that may be using it. So it seems like I need to go through a...