jquery

Is jQuery UI missing a state?

The jQuery UI widgets seem to have inactive, active, and hover states, but lack a depressed (clicked-and-held) state. Is this an oversight? Just about every modern UI I can think of have a depressed state. Has anyone added such a state? If so, what pieces of code did you have to touch? Edit: What I should have said is that hovering an...

Can I use localhost as the domain when setting an HTTP cookie?

I am using a jQuery plugin to set cookies and when I use localhost for the domain it will not store the cookie. Here is the plugin I am using with jQuery 1.2.6. http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/ Below is the code that I am using. You can see it does not like localhost, and I am running it from a development ...

jQuery UI Dialog validation without using <form> tags

http://bassistance.de/jquery-plugins/jquery-plugin-validation/ looks to be the best jquery validation plugin out there. I can't seem to get it working in the jQuery UI dialog though. This code works outside of the dialog DIV: <script type="text/javascript"> $(document).ready(function() { $("form").validate(); $("a").bind("cli...

Using jTemplate with ASP.NET MVC

In this article, Dave Ward describes how to use the jQuery plugin jTemplate to create what he calls a "client side repeater", that parses JSON data into a template on the client side. Toward the end of the article, he suggests that the template is placed in a separate file with the extension ".tpl", and that the data is loaded into the ...

jQuery Validation plugin and ASP.NET validators Web Forms

I would really like use the jQuery Validation plugin in my ASP.NET Web Forms application (not MVC). I value jQuery validation for the Richer UI experience I can provide the end user and I have some requirements to highlight the invalid fields using a red border (css). I value asp.net validators because they run the validations not onl...

Can DokuWiki & jQuery play together?

I'm having some trouble getting jQuery to play nice with DokuWiki - has anyone already done this successfully? At the moment, including jQuery reuslts in all sorts of JS functionality breaking, and I'm having trouble tracking down the source of the problem. What are some things to look for that tend to conflict with jQuery? ...

Left() function in Javascript or jQuery

Hi, I just want a very handy way to extract the numbers out of a string in Javascript and I am thinking about using jQuery, but I prefer the method that proves to be the simplest. I have requested the "left" attribute of a css block using jQuery like this: var stuff = $('#block').css("left") The result of "stuff" is 1008px I just w...

Multiple javascript/css files: best practices?

I have about 7 Javascript files now (thanks to various jQuery plugins) and 4-5 CSS files. I'm curious as to what's the best practice for dealing with these including where in the document they should be loaded? YSlow tells me that Javascript files should be--where possible--included at the end. The end of the body? It mentions that t...

Notifying the user after a long Ajax task when they might be on a different page

I have an Ajax request to a web service that typically takes 30-60 seconds to complete. In some cases it could take as long as a few minutes. During this time the user can continue working on other tasks, which means they will probably be on a different page when the task finishes. Is there a way to tell that the original request has be...

Problems with jQuery UI Datepicker

Ok, I've rolled my own theme, I've made a custom jQuery UI pack (progress bar, date picker, slider) and installed it all. Seems to (mostly) work except for two things: When my page first loads the datepicker div is visible; and The text "Next" and "Prev" are visible in large font underneath my icons. None of the examples seem to have...

How do I unset an element's CSS attribute using jQuery?

If I set a CSS value on a specific element using: $('#element').css('background-color', '#ccc'); I want to be able to unset that element-specific value and use the cascaded value, along the lines of: $('#element').css('background-color', null); But that syntax doesn't seem to work -- is this possible using another syntax? Thanks i...

Mootools and JQuery Integration

Dear all I am using the code Mootool[1.11.] and JQuery[1.2.6],Its working fine when these are separate. While i am integrating firefox throws (document).ready(){} is not a function. Is any wrong in my concept, What to do to rectify it?.Any help ...

checkbox select/deselect in repeater when click on text (jquery)

say we have simple asp.net repeater, in a row we have one checkbox, one label (database-id of the record) and not visible (used for postback) and one text (in a tabelcell) now i want to make it like in windows, if you click on the text, the checkbox should be selected or deselected. has somebody a link or solution for this, maybe alre...

JQuery Tablesorter issue

Hi, I have this table where the is initially blank. Then when the document is ready I call a function that runs an AJAX query for the table content. The initial content is sorted awesomely! But when I call my function again with different parameters to get new content, things start to go wrong. The table fills with the new content just...

How to use jQuery in Firefox Extension

I want to use jQuery inside a firefox extension, I imported the library in the xul file like this: <script type="application/x-javascript" src="chrome://myExtension/content/jquery.js"> </script> but the $() function is not recognized in the xul file neither do the jQuery(). I googled about the problem and found some solutions but no ...

Cancel jQuery event handling

Hi, I have setup onclick event handeler in the following manner: element.onclick = fuction() { /*code */ } Imagine there are event handlers setup using jquery method bind() or similar handlers. $('element').bind('click', function(){/*another function*/}) How can I prevent invoking handler defined with jquery from the handler I hav...

AJAX/JQUERY/PHP issue...

I am trying to use an ajax 'POST' call through the jquery $.ajax function to send data to a php file. For some reason the callback is a success but the data is not getting to the php file. Here is an example of the code: In JS file: $.ajax({ type: "POST", url: "setData.php", data: "myPOSTvar=myData" success: f...

Making your javascript maintainable

I am in the process of converting an internal application to use more Ajax via jQuery. I am moving away from the standard code behind of the current ASP.NET application and incorporating JavaScript methods that are going to run client side. My concern is what is the best method for allowing this application to stay maintainable for those...

jQuery and closure.

I have a multiple menu's on my page which all use the same mouseover and click events, so I decided to get it into a function. However vars seem to always be assigned to the last of the arguments for the hover(function, function) function. $(document).ready( function() { menuMouseOver = function() { for(i=0, u=arguments.length; i<u;...

jquery $.ajax function call is slow first time

Hi, I am using $.ajax to update some values in the database. when the page makes the ajax call for the first time, it is slow. it is taking like 5 or 6 seconds to return the result. after the first request, it is fast. I am not sure if there is a way to make the first call also fast. if you have any ideas, please let me know. Thanks, s...