jquery

How to add click event to jstree's(jQuery plugin) asynchronous list?

Hello, I want to add click event to jstree's asynchronous list items. The ideal result is: when i click the items in the jstree, the content of the item will be transfered to a sql query as a parameter, and then, the query is executed and display a result set in the same page or in another page. While I don't know how to implement it...

When is it appropriate to use accordions?

Accordions can provide flashy effects, but with regard to usability, when is it appropriate to use them? For example, in a menu tree with lots of options, an accordion can provide better overview of the categories. On the other hand, if I want to see all options available, I have to click around a lot. When do you use accordions? Thank...

jQuery Append function causes validation error

jQuery append function causes validation error. How to fix it? append("<span>"); causes Document type does not allow element here ...

Error placement in jQuery

I used the following code for error placement in my jQuery code. It's working but it shows error exactly after the input element but I want to place the error message exactly below the input element so how can I accomplish this job? Is there a function present insertBelow linke function i used insertAfter? how to place an error message...

How to enlarge image while hover over an image?

I want to show the thumbnail image large when hover over it, similar to the one in http://www.freelayouts.com/websites/html-templates Plz help. Any help will be appreciated. ...

Listbox.Length always 0 in JS

When I run the following JS I always get the confirm box popping up despite the list visibly having items. <asp:ListBox ID="list" runat="server" Width="135px" Rows="8" /> function CheckListEmpty() { if ($("#list").length == 0) { if (confirm("Are you sure?")) { //they clicked OK so save and close return true; } ...

jQuery: Adding text to an existing dynamic HREF

I am trying to amend a link using jQuery. The links are dynamically generated and I have no control over the existing HREF as they are called from a 3rd party site. Using jQuery, how can I change a link from this: example.com/?one=1&two=1 to this: example.com/?one=1&two=1&thisisadded=true so essentially adding &thisisadded=true to...

window.location change fails AJAX call

I've got a click tracking AJAX function (calls a WebMethod on an .aspx page), and I need to call it when the user clicks through to a link. Unfortunately, I'm using window.location = "newUrl" to change the page, which seems to make the AJAX call fail. Is there a way around this? I do not need to get any information back from the AJAX c...

What is the difference between these two statements?

Any difference between these two statements? $(document).ready(function() { // Code }); $(function() { // Code }); ...

jQuery div flickering when moving over trigger image

Hi, I have a div that appears when you mouseover a certain image: $('#link-test-img').mouseenter(function() { $('#popup-test').css('display','block'); }); $('#link-test-img').mouseleave(function() { $('#popup-test').css('display','none'); }); Surely mouseleave is only called to make the div not visible whe...

Getting a CSS value from $(this) in jQuery

So I have working code that animates a BG image via a plugin. This is a general solution though where each element in the class has the same BG image; I'm using a sprite with a unique image for each column of my navigation bar. THe code is thusly: $('#nav a') .mouseover(function(){ $(this).stop().animate( {backgroundPosition...

jQuery Determine if a matched class has a given id

What is jQuery has id equivalent of the following statement? $('#mydiv').hasClass('foo') so you could give a class name and check that it contains a supplied id. something like: $('.mydiv').hasId('foo') ...

How can I make sure my events always fire in jQuery? [Hover callback not firing]

I have a BG image animation that relies on the hover callback to revert to it's original state. If I move the mouse quickly over the links, the hovered state sticks. My guess is that I'm moving the mouse off before the first animation completes, so the callback doesn't register. Is there a more bulletproof way to write this function? $...

jquery - get all rows except the first and last

i want to dynamically add a class to all rows of a table except the first and last row. how would i do this without assigning a css class to the rows to identify them. I am getting all but the first row currently with $("#id").find("tr:gt(0)") i need to combine this with not("tr:last") somehow maybe? ...

How to delete all cookies with jquery

Possible Duplicate: Clearing all cookies with javascript I would like to have a checkbox assigned to activate and wipe out all cookies previously stored in my forms in one go. How would I do that with jquery cookie plugin? I can't seem to find examples in Klaus site and here. Any hint would be very much appreciated. Thanks ...

JQuery: Compact version of Slider control for mobile use?

I have mobile web app and want to use the JQuery Slider control. http://docs.jquery.com/UI/Slider However, to do so, it requires the entire JQuery core (29kb compressed & gzipped). Is it possible to just use Sizzle (4kb) + the JQuery Slider (4kb) control to have a working slider without the need for JQuery core (29kb)? (I'm trying to...

Fancybox gets javascript "not implemented" error in IE8 compatibility mode

When doing a modal pop up using jquery.fancybox-1.2.6.js it works on every platform I have tried except IE8 when set to compatibility mode. When the modal tries to display I get a javascript "not implemented" error on the page that keeps the modal from ever popping up. It gives the line number (line 207) the error occurs on in jquery.f...

What is better to use jquery Ui widgets or jquery plugins for similar things?

What is better to use jquery Ui widgets or jquery plugins for similar things? in terms of performance, easy to use. ...

How to set width of jquuery ui datepicker with multiple months

How can I set the width of the datepicker div when showing multiple months? I've tried changing the css for .ui-datepicker-group and .ui-datepicker-multi, but when I view it in Firebug the width is overwritten. ...

Problem with using Jquery.ajax over .load on Zend

Right now, what i'm trying to do is to replace a label on the front page with a block of html. Right now, the page basically has: <label id="replace"></label> the js currently has: $(document).ready(function(){ $("#replace").load('/test'); }); the Zend class function has: public function indexAction(){ $this->_helper->layout()...