jquery

Restoring page scroll position with jQuery

I have a page operation that uses something like: $('#thetable tbody').replaceWith(newtbody); in an ajax callback. Sometimes, if the user had scrolled the page down, this operation has the understandable side effect of scrolling the page back up. But the replacement appears seamless to the user so it's a bit annoying to have to scroll...

jquery hover event not working properly

Hello, I have a simple horizontal menu and when I hover each one of the items a sub menu slides down. So basically it is a typical navigation menu that we see so often. I want that when hovering the sub menu slides down and up when mouse out. My problem is that if I move the mouse so fast through the items it happens that more than one ...

Jquery UI: Animating remove class on callback of animating add class fails

Hello all, When some new list item is added I want it to 'blink' by animating adding a class and removing it after on the callback. This is the code: $li.addClass('new', 1000, function() { $li.removeClass('new', 500); }); Css: #galleries-list li { margin-top: 10px; background-color: #EEFFFF; border: 1px solid #99FFF...

JQuery JEditable - How to Add A Visible Edit Me Button?

i love this plugin but the reality is that most people won't realize at first that they can click on the text to edit. Ideally, it would be nice to add a Button next to the text or a simple [Edit] link that the user clearly sees but never gets submitted via ajax. Any ideas? ...

Best Way to Insert An Element With JavaScript

I have an HTML form which consists of several fieldsets (each has identical fields). I want users to be able to add additional fieldsets by clicking a button (jQuery). I can think of two approaches: Create a dummy hidden fieldset and clone it when the add button is clicked. Create a function that renders the fieldset's HTML from a stri...

JQuery - Set Attribute value

I have following HTML with two elements having the same name <input type="hidden" name= "chk0" value=""> <input type="checkbox" name="chk0" value="true" disabled> Through JQuery, I want to set the enable the checkbox. So, I am using something like this: $('#chk0').attr("disabled",false); But this doesn't work. I assume JQuery is ge...

jQuery validation plugin and .ajax

So, I have a form where I load divs as I go asking for various user input and displaying some offers. I have the following: $("#calcPrice").click(function() { $("#invPricing").validate({ rules: { ... }, messages: {... } , submitHandler: function(form) { .... $.ajax({ }); $.ajax({ }); re...

Thumbnails fadein fadeout specific div fade issues

I am using this code to hide and show a div based on which thumbnail you rollover; $(document).ready(function(){ $('div.infodiv').hide(); $(".website_thumbs a").hover( function(){ var name = $(this).attr("name"); $(".infodiv").stop(); $("."+name).fadeIn(); }, function(){ var name = $(...

What is the reason for this error in jQuery/JavaScript function?

When I execute the following JavaScript function I receive the following error: '2' is null or not an object. The input from txtRawCardData element is a string containing ^ character which I split into an string array. Update I receive this error only when I run my jQuery code in Internet Explorer 7. I do not receive this error ...

Close ColorBox iframe after submit

I'm using jQuery ColorBox to show a shopping cart item. When a user enters the quantity in the iframe and clicks on the submit button, I want the iframe to close and main window (parent) to be refreshed automatically. I mean I want two things after submitting data on iframe: iframe automatically closes. parent window automatically re...

Should I unit test my JavaScript?

I'm curious to if it would be valuable, I'd like to start using QUnit, but I really don't know where to get started. Actually I'm not going to lie, I'm new to testing in general, not just with JS. I'm hoping to get some tips to how I would start using unit testing with an app that already has a large amount of JavaScript (ok so about 50...

Slight problem with pixels and browser with my jQuery effect

In order to highlight a certain p element, I've written some JS to make it appear above a darkened background. In order to do this, I used jQuery to create an overlay, and then clone the information p element and absolutely positioned it over the overlay. Because it dropped a few CSS properties (not being inherited because of the new p...

using a value retrieved by jQuery in calling a php function

Through use of jQuery I arrive at a number (id of a specific widget on my page). The variable that holds this number is active_widget_id. What I need to do is: make use of this number as in the following: <?php $toggleImage = $text_widgets[active_widget_id]['toggle']; ?> get the resulting $toggleImage value (it is the name of a fi...

JQuery UI Dialog widget problem with IE and ASP.NET

The JQuery UI Dialog model form widget has an issue with ASP.NET when a button on the dialog is clicked to submit the page. It doesn't work because the form elements in the dialog window are outside the html form tags. So I used the fix of doing $("#dialog").parent().appendTo($("form:first"));. It works in Firefox but not in IE becaus...

what is the best iframe modal box

Hello, i want a internal popup or nice modal box which contains an iframe ( i should able to set the width and height ) and which is easy to install , and has no too much files. i don't prefer lightbox currently. Thanks ...

jQuery Select Plugin That Will Allow for Folder/File Structured Tiered Options?

Does anybody know of a jQuery plugin that will allow for what I'm calling "tiered options" within an HTML select element? By this I mean something similar to the folder/file structure system that you find on most Operating Systems. Here's a screen shot of what I'm talking about from Windows: I'm not as much concerned with having the i...

Jquery ajax issue with radio button list

<input type='radio' name='rbTemplateList' id='template1" value=1 > <input type='radio' name='rbTemplateList' id='template3" value=3 > <input type='radio' name='rbTemplateList' id='template5" value=5 > <input type='radio' name='rbTemplateList' id='template7" value=7 > I want to onclick one of the rbTemplateList, will raise a...

jquery image resize and rotator

Hi, what I am looking is for a jQuery plugin capable of rotating and resizing an image using handles, like in this pic (this is the webapp). Working with jQueryUI rotating and resizing the same image is really messy and the image does not contain handles to click to rotate and move. ...

jFeed not parsing images inside RSS feed

Suggestions on how to fix this? It's imperative that I use javascript, sadly, or I would have been using SimplePie eons ago. ...

jQuery animation issue in Chrome

I was animating an a element in jQuery using jQuery 1.3.2 and jQuery color plugin. I was animating the 'color' and 'backgroundColor' properties at the same time. In IE8 and FF it worked just fine. Chrome animated the mousehover color and then stopped. The background stayed the same and the mouseout did not undo the effect as it should ha...