jquery

How can I integrate Prototype and jQuery with Scriptaculous?

I have been using jQuery and I need to use Scriptaculous and Protoype. I have tried using the jQuery library extending another library. I defined it using the following syntax: jQuery.noConflict(); jQuery(document).ready(function() { }); My jQuery works properly and I have divided the three modules. I need to have all three modules o...

Hidden Field altered through javascript not persisting on postback

I have a web user control with a hidden field on it. When a javascript event (click) ocurrs, I am trying to set a value in the hidden field, so that the value can be retained on postback and remembered for the next rendering. The control is a collapsible panel extender that does not cause postback, uses jquery, and if postback occurs e...

Start animating div when...

I am working on a rather complex jquery-to be animation which moves various div's based on different trigger events. To simplify the scenario I am trying to solve, see the following: I have DIV 1 and DIV 2 on the screen DIV 1 needs to animate from position A to position B DIV 2 needs to also animation from position C to position D, how...

Click event does not work after ajax paging

I really hope someone can help with this problem. I have an ajax pagination script that works great on the first page but the click events will not work on any other pages from the paging. This is how I have it setup: jQuery script <script type="text/javascript"> // prepare when the DOM is ready $().ready(function() { //popup div $("...

Problem with jQuery dynamically calling functions

for(n=0;n < 20;n++){ $('#button' + n).click(function () { newAction(n); }); } function newAction(x){ alert(x); } The problem with this code is that when I press buttons their click actions somehow are not linked to their number, so by pressing button5 i may get alert 6 or something like that. ...

Debugging scripts added via jQuery getScript function

I have a page that dynamically adds script references via jQuery's $.getScript function. The scripts load and execute fine, so I know the references are correct. However, when I add a "debugger" statement to any of the scripts to allow me to step through the code in a debugger (such as VS.Net, Firebug, etc.), it doesn't work. It appea...

Hiding then showing a div using jQuery

I want to slideUp some divs, then slideDown 1 div. However, I'm having some issues. $("#divDocument,#divLocation").slideUp("normal", function() { $("#divSearch").slideDown("normal", doStuff()); }); With this code, divDocument is visible, divLocation isn't. Because the divLocation is already hidden the doStuff() event fires immedia...

Javascript conflict on my html page

Hello, I have an accordion menu and a lightwindow script on my web page. The lightwindow script does not work because of the accordion script because if I delete the latter the lightwindow script works. There must be a conflict but what? Here is the head section of my page: <!-- lightwindow files --> <script type="text/javascript" s...

Remembering last open state

On the site http://www.ryancoughlin.com/hp/?c=posters, I am using this code for the left hand side: $(".menu-header").click(function() { $(this).next().toggle('slow'); return false; }).next().hide(); If you open one of them and hit another section, it closes, is there any way to keep that state open? Thanks, Ryan ...

jQuery Slideshow: How to remove fancy effects?

I am using the slideshow from this page: http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html It does just what I need (big main picture with list of numbers to see other pics, easy to style) but I do not need/want the slidey effect that it's got going on. I just want to click the number and have t...

Can you put script tags in between php tags?

I'm trying to make a div fade out with jquery after the form validates the user input after pushing submit. I'm trying to avoid the form from fading out before it validates in case the user didn't enter the correct information. I would like to know if I can just add script tags in between my php tags, so that once the validation finishe...

How can I show a confirmation thickbox with the selection after user presses submit?

How can I show a confirmation modal dialog with the information from the form so that user can confirm what they selected in the form and it submits only if the user says so? confirm.$("#submit-button").click( function(){ if (validator.form()==true) { tb_show("Countdown", "are_you_sure.html?height=100&width=200&modal=true", "...

iframes problem in ie

Hi, i am using iframe to refresh captcha whenever user makes an error in typing captcha text. this iframe is inside a form which looks like this... <iframe id="cvbnm" frameborder="0" width="176" height="75" marginheight="0" marginwidth="0"> </iframe> and whenever user types wrong captcha i am using $("#cvbnm").attr("src", "ca...

How do I return errors from my asp.net mvc controller when doing a jquery ajax post?

Hi! I'm creating a website in ASP.NET MVC and have stumbled across something I really can't figure out. I've got a user profile page that allows a user to change his password. On the serverside, I want to validate that the user has entered a correct "current" password before allowing the change. What's the best way to return to my Vi...

Problem selecting class using jquery

Hi everyone, I've been banging my head against a wall trying make this work for a while now. I'm trying to shorten the comment body to one line for compact comment preview. I'm using jquery .each function to go through each .cbody (comment body) in my threaded comment system and place it in the cshort div inside chead. It should work but...

Is it possible to use jQuery to manipulate XUL elements?

I know its possible to integrate jQuery within mozilla addons, but are we able to manipulate (animate, move, adjust transparency, etc) xul elements themselves? From what I understand, the mozilla addon can use jquery to manipulate html/dom elements, but not sure about xul elements. All links and tips are appreciated, -=Vin ...

Flash-like visual effects in JS / jQuery

I know there are thousand of visual effects made in JS that can be found on Google. But most of that effects are useless in web-design, or are outdated like "clock following mouse cursor" :| Also I know sites like http://www.chromeexperiments.com and http://www.dhteumeuleu.com but those examples make web-browser uses 100% CPU power and m...

jQuery callback not being called

I'm using the .post AJAX method of jQuery: // completion toggling $('.item input').click(function() { $.post('complete.php', {item: this.id}, function() { $(this).parent().fadeOut('slow'); }); }); What am I doing wrong here? The AJAX works as the record is updated but the callback event never happens. No errors in Fire...

jQuery Toggle - any way to know which (hide or show) is being applied?

I'm working in Adobe AIR, and I have a list of divs that show expanded information for each list item in a hidden div on a click - like so: $(this).click(function(){ $(this).next('div.info').toggle(); }); This extends the height of the whole app, so eventually, if the user were to expand all of the divs, there'd be a scrollbar on the...

Call a javascript function after 5 sec of last key press

Hello, I have a form with an <input type=text /> and I want to call a javascript function after 5 seconds of the last key press, and every time a new key is pressed, this timer should reset and only call the function after 5 seconds. How can I do this? I'm using jQuery. thanks! ...