jquery

Pick form field values and calculate totals using jquery

I have a form with these rows: <td> - </td> <input id="invoice_invoice_line_items_attributes_2_item_type" name="invoice[invoice_line_items_attributes][2][item_type]" type="hidden" value="other" /> <td><input id="invoice_invoice_line_items_attributes_2_description" name="i...

how to detect which level on the dom is selected

I have the following selector $('#navigation ul li a').click(function(evt) {} this get the elements i need, but also retries child elements. ie i get me this as well #navigation ul li li a // extra li Just wondering the best way to detect what level of the dom i am selecting. ...

Multiple calls with Simple Modal OSX Style Dialog

I am using Simple Modal, the OSX style version. I have two calls to the modal and therefore two versions of content. When either of the buttons is clicked it selects only the first lot of content. There is nowhere to put a hook on the content like most modal windows as there is no javascript on the page to add parameters... only an ext...

Add Classes to first level list tags

Hi, is there a way to add class to only one level on li tags? in m case at the moment it looks like this: <ul> <li></li> <li> <ul> <li></li> <li></li> </ul> </li> <li></li> </ul> And this is what I need <ul> <li class="lev-one"></li> <li class="lev-one"> <ul> ...

Simple jQuery UI DatePicker question

Maybe I'm asking a really stupid question here but how do I update an input field with a date if the datepicker is attached to a div. Don't want to use the altField function as I want to use this to display a user friendly output to the site user. Thanks ...

Getting rid of Value attribute of a textBox when using clone method in jQuery

Hi, Im having problem with this form im working on. Whenever I add, or refresh the page, the values are still there. I believe this is because the clone method copies the value attribute from the textBox. Is there any way I can get rid of them when i add another textBox. <html> <head> <title>JQuery Example</title> <script type...

good jquery exention for on-the-fly CRUD

Hi I have a user profile page, and I'd like to have an extension that will let the user edit his details on the page, on the fly. The way I figure this happening is once any value is clicked (i.e., "my nickname") it is converted to an editable textarea, and on blur of said textarea, the data is submitted via ajax to the sever, and the f...

jquery - setting a limit of items, that can be dragged into a list

Hi, i have this two lists, from which i can move items from one to another with jquery ui and connect lists, with ajax. If an item is pulled over, a message is generated in a php file and then it appears on screen. Now i want that for example the right list should be allowed to contain ten items at max. It would be great if it would be ...

Wait for a particular image to load completely using jquery?

I am currently using the code below to load images but I want to show some kind of loading gif before the image loads completely. $('#addimage').attr('src', src[i]); $('#addimage').show(); Since I am using this in a animated mediabox the image loading in blocks does not look good so by the time the image is loading I want to replace i...

jeditable not updating browser display - leaves "click to edit..." after succesful edit

I am using jeditable fairly simply and it all works fine, updates the database, etc. The only problem I have is after the user types the new value data and hits enter it doesn't update the field in the browser to show the new value - instead it puts "Click to edit..." in place of it. Am I missing something like a return value from my ph...

how to refresh datepicker? function .datePickerMultiMonth()

Hi Everybody, Really like datepicker. Thanks a lot for this great library! I have got one question for you based in this example (inline datepicker): http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth5.html I added a "renderCallback" function to disable week days based on checkboxes... (e.g. when saturda...

How do I changes this code to make images rotate on refresh?

I recently asked how to rotate images on an element and was presented with this code - which worked perfectly: counter = 1; num_images = 9; dir = "URL TO IMAGE DIRECTORY"; function rotateImage() { var background_img = 'url(' + dir + '/image' + counter + '.gif)'; jQuery('#fader.category').fadeOut(function() { jQuery('#...

clearInterval(myTimer); for 60sec

i am trying to clearInterval for 60sec and restart when the 60sec are up jquery ...

How can I chain position animations usign jQuery without introducing a delay between individual animations?

I'm using jQuery to create animations of an image object. I would like the object to follow a square pattern based off points I have. What I'm currently doing is having four animations, just going point to point and they have the same duration. I want this to appear to be continuous, but there is a delay going from animation to animat...

UI Dialog Tooltip

Hello, I'm searching for a tooltips that should function within a UI dialog, but after searching and testing several tooltips (like cluetip) i have no succes.. :-s I've tested jquery Cluetip. This tooltip showed up when i mouve the mouseover a link/img, but the tooltip has showed BEHIND the ui dialog... ??? A z-index problem i guess. ...

How to get the class names using jquery?

Hey, I'm wondering how I can get the class names dynamically using jquery for the script below. The HTML output looks like this: <div id="main-info-1" class="maini"> <p>this is a paragraph.</p> </div> So, I'm trying to get the class name dynamically instead of hard coded like it is above. There are two parts where I need to get...

Add new items to a Html selectbox

Can I check for existing items in a html select box while adding them. A user types a text in a input box and then clicks button to add items. But I want to check for identical items before adding. Is there a efficient way to write this script? ...

Is there a project to generate a widget like uservoice?

I want to build a widget like uservoice that it lays on the left side or right side of the page. And when user click the widget, a dialog will popup and user can do anything we provide. Is there an exist open source project to implement this widget? ...

How do I grab the value from an html form input box as its being entered?

How do I grab the value from an input box as its being entered? ...

Toggle next element (jQuery)

HTML: <div class="interview"> <h4>Interview</h4> <a href="#" class="question">This is question 1?</a> <div class="answer">This is an answer!</div> <a href="#" class="question">This is question 2?</a> <div class="answer">This is an answer!</div> <a href="#" class="question">This is question 3?</a> <div class="...