jquery

jQuery form validation, show only latest error message

Hi, I am using the jQuery form validation plugin. The problem I have is that if the form is invalid and I click submit, each time another error/success message appears on screen for each field. Essentially showing a history of the error/success messages until the form is valid. Why is this happening and how do I fix it so that only th...

JQUERY: performing calculations on table cells

Hi guys, I have a php script which generates a pricelist in a table. Example of a generated table: <table> <thead> <tr> <th></th> <th>100</th> <th>+100</th> </tr> </thead> <tbody> <tr> <th>A5<span>210x148</span></th> <td>€65.00</td> <td>€8</td> </tr>...

jquery function applying to the same class with a delay

Okay, I'm trying to be clear on this one... I have some insliding boxes, all with the same class .box When the page loads I want these slide in from the left. This works perfect according to this code: $(document).ready(function(){ $(".box").animate({left: "-=920px", opacity: "1"}, 1250) return false; }); Now all the boxes ar...

How do I access jQuery AutoComplete extraParams with ASP.NET

I'm using the following jQuery script to send a 'Make' parameter to filter my 'Models': $(document).ready(function () { $(".autocomplete_make").autocomplete("/AutoComplete/Make.ashx"); }); $(document).ready (function () { $(".autocomplete_model").autocomplete("/AutoComplete/Model.ashx" ...

Set active link based on URL

If the URL ends: ?style=product I want to add a class of active to the li with the class of product HTML: <ul id="menulist"> <li class="product">Product</li> <li class="product2">Product 2</li> <li class="product3">Product 3</li> </ul> ...

Bind ready event on javascript dom element creation

Hi there, i would like to know if we can bind a loaded or ready event on an item created by a script when the dom is loaded. I heard from live() but it's not something clickable, it's just an item which has to load. Thanks for your help! ...

jQuery find does not seem to work

Hi I have a DocumentFragment stored in "selectedContents", and I am trying to find "span" elements in it, with the help of jQuery. It has two child nodes, where the first one is a text node, and the second one a span. When I try $(selectedContents.childNodes).find('span'), it returns an empty set! However, when I print the "$(selected...

using the jquery animate() api and can't get it to stop bouncing

Current code: $(document).ready(function(){ $('#go').hover( function(){ // Change the input image's source when we "roll on" $(this).animate({"top": "-=100px"}, 50, "linear", function(){ $(this).animate({"top": "+=100px"}, 50); }); $(this).attr({ src : '/gfx/go_over.png'}); ...

resize DIV matching the new content with jquery

Hello, I have a DIV which shows one image at once coming from an ajax script, the images are all different in height and are showed with fadeIn/fadeOut (just for the tag) How can I allow to resize the DIV (that contains the img tag of course) "sliding" based on the new content before the images that fadein changes the DIV height very r...

Question regarding jQuery click() function.

$('document').ready(function(){ $('[name=mycheckbox]').live('click', function(){ if($(this).is(':checked')) { alert('it is checked'); } else { alert('it is not checked'); } }); $('[name=mycheckbox]').click(...

Display modal after postback without ASP.NET Ajax

I have an ASP.NET button. When the button is clicked, I'd like a modal popup to display after the server-side code for the button runs. I don't want to use the ASP.NET Ajax control toolkit modal popup extender. With ASP.NET Ajax, I can hook into the end request event. Is there a way to do this without ASP.NET Ajax. just jQuery? I ba...

Dealing with a complex HTML structure in jQuery

I'm writing a jQuery plugin that will draw (with Canvas) and compare a forward and reverse traceroutes. The markup (which I full control over) currently looks something like this: <div class="traceroute-wrapper"> <div class="forward-traceroute"> <div class="hop">...</div> ... </div> <div class="reverse-traceroute"> <di...

MVC 2; How to copy a Html.EditorFor field in JQuery

I am trying to get used to the syntax in JQuery when using MVC 2. I want to copy a phone number from 1 field to another. However the syntax of the line below is wrong; $("#contractAdministratorContact_Phone").val($("#contactClientContact_Phone").val()); The above fields are defined as <%: Html.EditorFor(model => model.clientContact.P...

Continuing to hide HTML input fields when page refreshes?

On a HTML page there is a filter section consistenting of various drop-downs and textboxes. When the 'type_of_report' drop-down is selected the 'onchange' event will hide all the non-relevant inputs for that 'type_of_report'. The filter criteria is preserved via GET (which I retrieve via PHP $_GET). The problem is that when I submit t...

Jquery Image Slider with Margin Issues

View a live example here http://ninjaparadise.co.cc/ , you click it to the right it goes fine but when you click it to the left then you see whats wrong.. Heres the javascript code i use /* Slideshow */ $(document).ready(function() { slideshow_loading = true; slideshow_busy = true; current_slide = 1; slideshow_loop_interval =...

How would I convert this javascript to jquery?

function loaded() { document.addEventListener('touchmove', function(e){ e.preventDefault(); }); myScroll = new iScroll('scroller'); } document.addEventListener('DOMContentLoaded', loaded); If its possible... Thanks :) ...

table background image with jQuery and Image Splitting

I am trying to show a graph image which is horizontally long. The problem is, by the time user reaches the right end of the image, the y axis scale is not visible to him. I need to split the image somehow so that I can make the y-axis part of the image fixed and rest scrollable. I have 3 questions: 1. What is the best way to split the i...

jQuery FancyBox Iframe - Using $(document).ready within the fancybox?

I'm using Fancybox to load a form as an Iframe, but for some reason my $(document).ready(function () isn't working for some reason. Any idea why? ...

jQuery show div on click, hide the others

I'd like to have a text area on my page that shows a div and hides the others (let's say 8 other divs). On click, I'd like the chosen div to show and the current div & other divs to hide. Is there a simple solution to this? Possible to build off of: http://stackoverflow.com/questions/2509807/show-current-clicked-div-hide-previous-clicked...

How to implement javascript file into jquery? for ipad / implement iscroll

I am currently trying to implement this into my current code: http://cubiq.org/iscroll I have been using jquery this whole time in my code, but iscroll was created in all javascript. Is there any way to get this to work without having to change all of the javascript into jquery format? I am developing for an ipad and I need the ability ...