jquery

jQuery masked input plugin. select all content when textbox receives focus.

This is a followup question to this question: select all contents of textbox when it receives focus (Javascript or jQuery) basically I am using a textbox in conjunction with the jQuery masked input plugin When the masked input textbox receives focus i want to select all of the contents of that textbox, but it seems as though having th...

Rebinding jquery events to return html.

I am using jquery and having a problem with binding to return data from the web server. The data is coming back as HTML. Here's what happens.... User clicks a link and a dialog box opens up. The addToCurrent button is binded to a click event. The user submits the data to the web server and the returnFromAdd() is called on the return d...

jquery - How to select all content between two tags

I have a document with headings and unordered lists. How can I use JQuery to select a given heading (by its unique class name) AND all content between that heading and the next heading? ...

jQuery .animate() Issues

I'm trying to make a autoscrolling/carousel like function for an unordered list of images. When you mouse over the containing div its calling a function that's job is to animate the margin on the <ul> $(".thumbs").animate({"margin-top": (currentMargin - 10) + "px"}, function(){ console.log("margin-top" + (currentMargin - 10) + "px...

Problem getting themes to work in jQueryUI using Google-hosted jquery-ui.js

I'm new to jQueryUI and I think I am overlooking something very basic... Quick description of my problem I used ThemeRoller to download a jQueryUI theme, which also generates a jQueryUI javascript file. I'd rather use the file hosted at Google (http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js), but when I do this t...

Gradient fill using jQuery?

I've got a <div> that needs a gradient background. However, the size of the div is variable, which lands me back in "can't do gradients in CSS" land. However, I'm pretty sure this is possible in jQuery, I just can't seem to find a decent example. Does anyone have something they can point my way? Thanks. ...

How to skip to next iteration in jQuery.each() util?

I'm trying to iterate through an array of elements. jQuery's documentation says: jquery.Each() documentation Returning non-false is the same as a continue statement in a for loop, it will skip immediately to the next iteration. I've tried calling 'return non-false;' and 'non-false;' (sans return) neither of which skip to the next ...

asp.net mvc : Ajax actionlink or Jquery solution?

Im trying to change images on click similar to what SO does with the vote arrows and checkmark. Im thinking either to : 1- Have each image be an Ajax.ActionLink and return a different image when clicked. 2- Have the images be the background of a Hyperlink and use Ajax.ActionLink to replace the css class to get a new image. 3- Use JQ...

Javascript 'this' Problem

Why are 'me' and 'this' undefined when setTimeout calls it's anonymous callback? var gMyObj = new MyObj(); gMyObj.myFunc(); function MyObj() { this.myFunc = function () { var me = this; alert(me.constructor); // defined setTimeout(function(me) { alert...

The jQuery Validation `valid()` method returns 0 when required is not true

I'm using the jQuery Validation plugin and I've got a textbox with the class digits to force it to be digits only, but not required. When I call validate on the form it works fine, but if I call valid() on the textbox when it's empty, it returns 0, despite no error message showing and required not being set. Does anyone know why it wou...

Conditionally selecting a version of jquery depending on environment

I have 2 references to jQuery in my master page which is currently configured for production release: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"&gt; </script> <%--<script type="text/javascript" src="../Scripts/jquery-vsdoc.js"></script>--%> When I'm developing, I uncomment the...

Any alternative to blockUI for jQuery?

Hello, The question says it all! I am looking for an easy to use alternative of blockUI for jQuery. I've been trying for days to center a dialog box with blockUI in both FireFox and IE but no chance. It doesn't work. I looked at this question about centering a blockUI dialog box (http://stackoverflow.com/questions/294502/how-can-i-get-a...

JQuery - making code execute for each new DOM object instantiated

I'm wondering if this is possible in JQuery. I have some Javascript code that creates DOM objects on the fly, in response to user actions. Some of those DOM objects are in a specific structure - the container always has the same "class" attribute. What I'd like to do is, every time a new instance of a DOM object with class "X" is creat...

How to make dropdown menu like "delicious" and "google" ?

Hi, I want to make a dropdown menu like delicious has at this http://delicious.com/search?context=all&amp;p=sql&amp;lc=1 page. In this page click the arrow which is with "Search" button. On click it displays a drop down menu, I want the same menu style but on my page I am having a link, what I want with that link a simple small icon wil...

JQuery to check for duplicate ids in a DOM

I'm writing applications with ASP.NET MVC. In contrast to traditional ASP.NET you're a lot more responsible for creating all the ids in your generated page. ASP.NET would give you nasty, but unique ids. I'd like to add a quick little jQuery script to check my document for duplicate ids. They may be ids for DIVS, images, checkboxes, butt...

What options are there to find out if my ASP.NET MVC view is not XHTML compliant

Clarification: Thanks for the suggestions of tools for validating XHTML. I'm primarily looking for a solution that will run server side (or on the client with jQuery) so i can set it and forget it during development - and get told when I have issues without having to run a tool all the time. All this tag soup stuff scares me with ASP...

JQuery problem with timeout

Hi All, I have found a problem with use JQuery timeout, i have a page with script, it's set a timeout and waiting response from server. The problem is when timeout have to perform, in short words, it "no action". I think that script not interrupt the connection with server and wait for server response, because in server side the connect...

jQuery CDN host with vsdoc?

Following on from this question (that I asked) and this question (that Simon asked), is there a CDN that provides the jQuery script AND the -vsdoc version side-by-side? e.g. Google provide: http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js but don't provide http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min-v...

how to select only the background in jQuery

Hello, I would like to add two events to my items. One for the "background" of the document: $(document).click(function() {do()}); One for the divs in the document: $("div").click(function() {do2()}); The problem is that when I click on a div, both functions, do and do2 are called. How can I thus tell to call do() only when I click ...

ASP.NET Forms Authentication using third party javascript library

I have a website where I currently use ASP.NET's built in Authentication, profile and role management. I would like to move some functionality (including authentication) to the client side using a third party javascript library like JQuery or Mootools without the use of ScriptManager and generated proxy classes. There is very limited in...