jquery

How to get class name using jquery

Hi, Suppose I have an element like this: <div id="dv" class="red green blue">Something Here !!</div> I used this: alert($('#dv').attr('class')); But it gives me all three at the same time, I need individually probably stored in an array. How do I get each of those class names using jquery? Should be simple, right? ...

How can I remove RequiredField validation from a asp.NET button by using JavaScript?

Hi, What is the simplest way to remove -unbind- required field validation from a button which is added in asp.Net Page by using RequiredFieldValidator control on the client-side by using Javascript or jQuery functions? Thanks! ...

jQuery Dialog doesn't display code from .appendTo in IE6

I'm using jQuery's validation on a form. When the form is validated, I'm using a submitHandler to fill a dialog with data from the form then I open the dialog to display it. Works great except for in IE6. Nothing displays. I've tried initializing the dialog before and after running the validation code but neither makes a difference. ...

How to use Jquery for sliding effect

I am new to javascript and jquery. I have written some javascript code for some client validation. document.getElementById(spnError).style.display = 'block'; This is how I am showing a span if there is some validation issues in the form. I want to use Jquery to show this span. I would like to slide it down slowly. ...

Selecting the correct input field using jquery

I'm trying to select the id's of dynamic input fields in my code. When clicking a button, the form will create a form field like this: <td><input type="text" id="field_a_1"></td> <td><input type="text" id="field_b_1"></td> <td><input type="text" id="field_c_1"></td> When I click on the button again I get this: <td><input type="text" ...

Lightbox, floating a close button outside of an iFrame

Hey, I have decided to reword this question (as opposed to creating a new one)... I have a Lightbox (Colorbox), which opens an iFrame with basic HTML content. In fact, here is a picture: I would like the Close button to be where the Hollow White box is. The Lightbox (Colorbox) CSS is as follows, nothing I seem to do works. :( (The C...

How to remove the selected element during a clone() operation

Hi All, I have a select box that gets cloned. I want to remove the user's previous selection from each cloned select box. Here is the method that does the clone() : function addselect(s){ $('#product_categories > .category_block:last').after( $('#product_categories > .category_block:last').clone() ); set_add_delete_links(); retu...

Progress Bar Filling - jQuery Implementation

I'm implementing my own Progress Bar using jQuery. My question is how can I fill (for example) only 30% of it with a background ? What are my options ? Basically, the Progress Bar is a simple div with rounded corners (-moz-border-radius). I'm using Firefox 3.6.3. [Update] I tried this example. How to force the right side of the filled a...

Jquery calendar with marked dates

Hi, Im looking for a calendar component for jquery that looks like the one in outlook navigation pane. A smaller calendar where you can easily mark dates as bold if there is an event planned for this date. Anyone have any suggestions? I guess you could take any kind of date picker and modify it but I would like something that just wor...

jqGrid custom formatter

For one of the columns in my jqGrid, I'm providing a custom formatter function. I'm providing some special cases, but if those conditions aren't met, I'd like to resort to using the built-in date formatter utility method. It doesn't seem that I'm getting the right combination of $.extend() to create the options that method is expecting...

I need to add a range for a date input field in jquery

I've got an input field in a form that needs a date value. I'm using jQuery UI's datepicker for the calendar and I've set a range for it. However, the user can override that by typing a different date in the input field. How can I specify a date range for the field with jQuery validation? All I see with jQuery is that you can only sp...

jQuery UI Autocomplete, load results to a different location(div)?

I am converting from YUI to jQuery and can't see a way to load the results of the autocomplete into a div or other such container. I want to be able to populate a div with formatted results, including an image based on the return, not just a simple drop down from the input. ...

Load a Struts 2 action using jquery in javascript

Hi I'm using struts 2. I'm trying to reload a target div from a javascript by using jquery to target the div and a struts action that loads the content. Does anyone know how to do this? The problem is how I use (javascript) jquery to do this. BR, Tobias ...

What are jQuery best practices regarding Ajax convenience methods and error handling?

Let's suppose, for an example, that I want to partly clone Gmail's interface with jQuery Ajax and implement periodic auto-saving as well as sending. And in particular, let us suppose that I care about error handling, expecting network and other errors, and instead of just being optimistic I want sensible handling of different errors. If...

Abstracting the adding of click events to elements selected by class using jQuery

I'm slowly getting up to speed with jQuery and am starting to want to abstract my code. I'm running into problems trying to define click events at page load. In the code below, I'm trying to run through each div with the 'block' class and add events to some of its child elements by selecting them by class: <script language="javascript"...

jqgrid : how to change the class of one cell (when mouse is over on) ?

Hi, I set cells of the first column of my grid, with a class as follow: $("#myGrid").jqGrid('setCell',rowid,'column_1', '', '**ui-state-default**'); How to change the class of a cell when the mouse is over on it ? Thanks you so much ! ...

jquery plugin to show form based on select option

I have a form which includes select options with different items. Based on item selected, I need to show respective form on the same page.Does any one know jquery plugin for this or how aesthetically we can do this kind of requirement? ...

How to use CSS to ensure items remain offscreen even if window is resized?

I am trying to implement a type of slider using jquery. However this question is about the CSS involved in trying to achieve the functionality. My site design occupies a central column of width 960px. Within this layout there is a central element, that I wish to slide right, on click of a "next" button, and at the same time, another ele...

Calling a web service from javascript and .net 2.0

Thanks all for the help, rod. Hi All, Is it possible to call a web service (on my localhost) from jquery in a plain html page inside an asp.net 2.0 webform application using visual studio 2005? <script type="text/javascript"> $(document).ready(function(){ $('#button1').click(function(){ $('#...

JQUERY Prepending an LI to an UL with Animation

Hello, I have a UL and I'm working to dynamically add a new LI to the top of the UL with some animation. I have the following so far which works ok: $("#container").prepend('<li id="newhere"><input type="checkbox" /><span class="listTitle">Im new here</span><ul></ul></li>').hide().slideDown("slow"); #container is the UL The proble...