jquery

jQuery toggle show/hide elements after certain number of matching elements

In implementing faceted search, if the number of options is 7 or less, I will show them all. If the number of options exceed 7, I will show the first 5 only and insert a link that will toggle the display of these options. My question in this case is, how to run through the list of matching elements, in this case li's that fall within .f...

Javascript Script Combining and Caching

I am building a AJAX intensive web application (using ASP.NET, JQuery, and WCF web services) and am looking into building an HTTP Handler that handles script combining and compression for my JavaScript files and my CSS files. I know not combining the scripts is generally a less preferred approach, and I'm sure it's probably the way I wil...

browser memory increasing constantly with javascript ajax calls

Hi, I have a strange behaviour. I am using a rather heavy page (4000 nodes) meant to display a dispatch system for delivery operations. Every 30 sec. I am refreshing with jquery, the list of operations (3000 nodes over 4000). It works perfectly well, but... each time, the memory of both firefox and chrome is increasing by 3 to 6ko. Of c...

Django: What's wrong with my simple ajax experiment?

I am trying to understand how Django + Jquery and Ajax calls work together. It is just a simple /test/ url that shows a single input form, once submitted retrieves the answer from the server via ajax. For that I have written a very small view: def test(request): if request.is_ajax(): from django.http import HttpResponse ...

Select Table Row in jQuery

What's the best way for selecting a table row by index using jQuery? Thanks ...

jQuery - Add a class on click, remove it on Hover

I've got a simple jquery menu set up... it works fine except for the parent item. I've only listed one parent item, but there may be many, so raw #id won't work for this either. I want to apply a class when it is CLICKED, but then remove that class when the user hovers elsewhere and the menu slides away. Here is what I have so far that...

why does my jQuery drop-down hide when I hover it?

I have this drop-down menu made with jQuery (EDITED with first answer and still not working :( ) var currentDrop = null; var dropTimer; $(document).ready(function() { $("ul#menu > li").mouseenter(function(){ if(currentDrop) hideDrops(); currentDrop = $(this).children("ul"); currentDrop.show(); }).mouseleave(functio...

JQUERY Autocomplete using PHP and cross-site problem

Hi, I am trying to load a series of cities/countries in a textbox to display using jquery autocomplete. To do this, I attach the autocomplete to the textbox and call a PHP routine called SEARCH.php. This works fine if SEARCH is on the same server. When I try to call search from a different server (in this case, an ASP server), I get a ...

Gridview in a Tooltip

Is there a way to display a gridview in a tooltip? ...

Multiple drop down lists with the same behaviour with jquery

This is suppose to be a very simple question, but I can't seem to figure it out. I have forms over data type scenario, where someone can enter information about the services offered. So the form looks like this [DropDown: serviceType] [DropDown: services] [TextBox: info] [DropDown: serviceType] [DropDown: services] [TextBox: info] ......

jquery error popup relative

on click i want an error msg to popup next to wherever the click occurs. how do i specify the div coordinates? ...

jQuery event.which not working in IE

Hey Everyone, I am trying to get the code of an event using the event.which jQuery function. It is working great in FF, but in IE8 I am only getting "undefined". Is there some reason this would not work in IE8? I am using jQuery version 1.3.2 and the code is bellow (simplified). function handleInput(event) { //Get the character code...

how to remain facebox open after a form submition

I have a form that is shown inside a facebox but I want to validate the sutmibted data and if there is a error show it on the ame facebox. any idea hon how to do this ? regards ...

JQuery treeview plugin cookie path

How do I set the cookie path to "/" with the jQuery treeview plugin? ...

Position div at mouse

I have a floating DIV with dynamic content like this <div id="rollover" style="display:none;background:#ffff99;width:150px;position:absolute;z-index:9999"> <div id="rollover_content" style="padding:4px;border:1px solid"></div> </div> Event handlers fetch relevant content and set the innerHTML of the inner DIV. How can I position t...

Passing ID of element to a C# web service (using JSON) from jQuery

I have an containing a list of divs that jQuery turns into progress bars. On .ready, I build a list of all of these progress bars and for each one, call a webservice that gets a value indicating how full the progress bar should be. In order to do this, I need to pass the ID of the div to the web service. Because the divs are inside a ...

not able to open links in a new tab

I need to verify a lot of links on a page. Rather than opening each link myself. This is what I did. jquerified the page using firequery plugin. Then I typed following code in firebug. a = $('a'); $.each(a, function(i,val){ $val = $(val); $val.attr({target: '_blank'}); $val.trigger('click'); }); Even though I am trigger click ...

Load jQuery UI Accordion on the fly

I have this jQuery UI Tabs implemented. One of the tabs use AJAX to load the jQuery UI Accordion. I tried to load the Accordion after the content has been loaded. But nothing happend. Here is the code. The accordion is is Tab 2 (index 1). Anybody have a way to do this? Load the accordion based on user triggered action? $(functi...

What's the best HTML attribute to use to store information for jQuery to parse?

Must Support IE6 and must Validate vs XHTML Strict 1.0! This is tricky to explain... I'm using a generic class name to initiate a plugin feature on an associated element. I also want to have options associated with the element stored in an attribute as well. <a href="url.com" class="popup" rel="900x900" >My Link</a> With this, jQue...

How to avoid authentication redirects in jquery .load()

Hi, I have a system that login expires after 1 hour logged in, if I use jquery ajax function .load() it replaces the content with the login page. How can I detect this redirect and reload the entire page with the login content? ...