jquery

Jquery select first and last divs from a list of items.

Hi, how do I use jquery to select the first and last item divs in the following snippet and apply a different additional class to each: <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> These will be somewhere on a web page. Thank you. ...

jQuery LightBox Grid PlugIns

Hi, Just wondering if anybody knows of any jQuery Lightbox type plugins (URLs pls) for photo galleries, where are images are displayed in a grid type format which then the user can click on an image which zooms to the forefront and back again? Something similar to iPhoto Gallery on the Mac OS X platform but just want all the photos dis...

jQuery How to wrap div around multiple of the same class elements

I'm trying to wrap multiple same class divs into a div and to skip divs not with the same class. .wrap doesn't combine them, and .wrapAll throws the non-classed divs underneath. I've been tinkering around with attempts to create an alternate solution but with no avail. Original <div class="entry">Content</div> <div class="entry">Conten...

jQueryUI: selectable - cancel option when dragging the lasso over an element.

Hello, the cancel option on selectable does the following: Prevents selecting if you start on elements matching the selector. Is there a build-in way to make it ignore elements even if you drag over them? Cause with cancel it only works if you start from the element but if you start from a selectable element and drag the lasso ov...

jquery + css: enlighten buttons ?

how can I implement the "enlightening" effect, I can see in the "Tags" section in this website ? http://dribbble.com/shots/37765-Walken-on-Water-Halfsies?list=index I would like to not just change color (gray to white) of the background, but to progressively make the button lighter and lighter. thanks ...

jQuery alternative for document.activeElement

What I wanted to do is figure out whenever the user is engaged with an INPUT or TEXTAREA element and set a variable flag to true... and set that flag to false immediately after the user is no longer engaged with them (ie. they've clicked out of the INPUT/TEXTAREA elements). I used jQuery's docuemnt.ready function to add the onclick att...

jQuery Advance Selector

<ul id="comment1"> <li>reply1</li> <li>reply2</li> <li>reply3</li> <li>reply4</li> <li>reply5</li> <li>reply6</li> <li>reply7</li> <li>reply8</li> </ul> how to select last 3 or 4 replies with jquery? ...

Retrieve Data Step by Step after a certain delay using ajax and jquery in php

I am a beginner at Jquery. What i want is to display the data using AJAX in a step by step manner. So let say if in my database there is a table "DATA" with a field name "info" having multiple rows as a data info 1 2 3 4 5 Now i want to display all the five rows but after a certain delay of time let say after a second. So i want to ...

What's wrong with this jQuery snippet?

I am getting the following error message in my FF console: "uncaught exception: Syntax error, unrecognized expression: "" jQuery.noConflict(); jQuery(function() { jQuery('#foobar').click(function(){ var id = jQuery(this).parent().parent().attr('id'); var idstr = '"#'+id+'"'; jQuery.post("example.com/callbac...

how to highlight a div for a few seconds using jQuery

I want to be add the following to a a page: When a div is clicked, I want to: change the background color of the clicked on div for a few seconds revert back to the original background color after a few seconds I want to do this by using only jQuery available functions - i.e. not using a plugin or anything else. I am relatively new ...

What's the best way to prevent a browser from displaying images until they are fully loaded?

I would like to set up a lean and mean image gallery, with thumbnails displayed inline. I'd like them not to windowshade in while loading, I'd like them to simply pop up or, if there's a way to detect their completion, use a jQuery effect like a quick fadeIn(). I imagine a line of code like: $(".thumb-image").whenLoaded(fadeIn(500))...

customize jquery mask plug in

i am using jauery mask plugin from http://digitalbush.com/projects/masked-input-plugin/ i want to customize my plugin and try my besy to do it but i can't. What i want is i can enter digits only. all the digits will be formated automitcally (,) after every 3rd number. only two digits after (.) i use follwoing $("#product")...

Switching from JQuery to RightJS

I am currently using JQuery and recently heard about RightJS. RightJS seems to be faster, lighter & more object oriented. But I was wondering if RichJS has somethings seriously missing compared to JQuery (Other than the huge plugin base). Update: I tried RightJS in a small web project & decided to use it on a few more projects. But I ...

Jquery, disable / ignore hover event during fade in / out?

I'm trying to figure out if this is possible.. I have an image map that does fade in / fade out based on hovers over certain parts.. the problem is that when the user hovers to a different area during the fade it finishes the fade it was doing then does the one for the area the mouse was moved to.. if the user moves quickly between a fe...

Jquery variable problem

The HTML: <div class="first" id="first_id"> <div class="second">text sample</div> <div class="third"><button type="submit" class="some_class" id="some_id">send</button></div> </div> Jquery: $("#some_id").click(function() { var test = $(this).closest('.first').attr('id'); .. return false; }); I want to replace content of the "first"...

assign each elem of an array of values to each element in an array of elements jQuery

When I do $('#conatiner1 span') on my page, it returns an array with 11 span elements. I also have an array 'vals' with 11 different values. Is there a fast 'do more, write less' jquery command to easily assign each value of val to each span element? span 1 -> val 1; span 2 -> val 2; span 3 -> ... ...

JQuery assigning a newly created link to a variable?

Hello! How do i assign this newly created link to the local variable? tblOutput += '<td>'; tblOutput += $('<a></a>') .click(function (e) { $.fancybox({ 'autoDimension': true, 'showCloseButton': true, 'type': 'iframe', 'href': 'WordManagerForm.aspx?cmd=updateword&amp;categoryNodeID=' + nodeID + '&amp;nodeID=' + id_text }); ...

Jquery .get() - How to pass the value of a text box into the data parameter?

There is one form with a textbox id="name" and a button. After the user clicks the button, I want to execute the $.get() to capture the reply. (I got the .click() correctly so far) How to I pass the value the user enters to the text box as the {data} parameter in the get function? Thank you! ...

Jquery cannot access $(this) in callback function

Hello, I am creating a plugin and it cannot access $(this). A simple overview of my plugin is (function($){ $.fn.myPlugin= function(options, callback) { return this.each(function(){ $(this).click(function(){ // some plugin works .. callback(); }); ...

How to set the value for form fields.

Hi, I want save multiple individual records for a single model. So my form will have <input> elements with IDs that look like this Author0Title; Author1Title; Author2Title, etc. I will be getting values for these input's using jQuery.getJSON() method. I want to assign individual values for these input like these automatically. docum...