jquery

Use jQuery's .wrap on all children of a given tag

Working jQuery, what I'd like to perform is something similar to the following: $('sometag').children().wrap('<div></div>'); With the resulting DOM manipulation wrapping all children in one div, not each child individually. Starting example HTML: <div> <h3>Heading</h3> <p>Paragraph</p> </div> What this line of code does: <d...

What is the best way to go about creating a page of stickies with savable and retrievable content?

I have had a look at sticky notes with php and jquery and jStickyNote, and while both seem to look pretty nifty they lack some elements I am after. I haven't been able to find a way to allow particular users to modify the stickies they create, nor have I found a good way to save their stickies into my database. I am, and would like to ke...

PrettyPhoto Jquery Lightbox link problems

Hello, I am using the fantastic PrettyPhoto Lightbox, a Jquery lightbox clone. To launch a lightbox with an iframe this is the code <a href="http://www.google.com?iframe=true&amp;width=100%&amp;height=100%" rel="prettyPhoto[iframes]" title="Google.com opened at 100%">Google.com</a> This works great! The problem is that I am using j...

Scroll position should unchange

hi friends, I have written connect and cancel button code to connect and cancel the page using jquery. when i scroll down and click the connect button the scroll position is changing(going to top again), what i need is, instead the scroll position should remain unchanged when both Connect and Cancel button is clicked pls, send some co...

Jquery history - Ajax navigation - How to make url request and search request?

I'm using the Jquery history exemple: mikage.to/jquery/jquery_history.html I don't really know how to make a search query using a search box form and how to create a search link like: mysearch.php?search=search+term&submit=1 Normal link are usually as follow: load 3 It's probably adding code to the function in the main page but i'...

post array jquery serialize

I am trying to post a javascript array to a php page. The array has to be associative. My structure looks like this: <input id="test" value="1" class="settings" /> <input id="test1" value="2" class="settings" /> When I create the array it is: var myArray = new Array(); $(".setttings").each(function(){ myArray[$(this).attr("id")...

Javascript Textarea Monitoring / Ruby Delta Calculation

I am working on a system which needs to keep constant (and I mean constant) track of browser side changes to a textarea via AJAX requests to the server. Ideally, every character would be stored as a row in the database, along with the position it was inserted and a timestamp. I am hoping that there is either a good Javascript library th...

Unnamed, non-existing .swf

I'm using jQuery sIFR plugin for text replacement, although it works perfectly but there's a link to an unnamed and non-existing ".swf" file. Is it issue related to the sIFR plugin I'm using? How do I fix it? Many thanks ...

Problem in displaying all images inside the folder using javascript

Hi, For my project I m using jquery bulit in photo slide show,jquery code is taking images from array and displaying the images..The problem is I have a lot of images which I don't want to put it in Array(because it need manual effort) instead of that I want to read each image from the folder and display the images. the advantage of doi...

Jquery Ajax $.getScript() method

Hi Everyone... $.getScript of Jquery's ajax methods can be used to load and execute javascript from remote location... Can it also be used to just load the javascript and execute it later when some event occurs on elements that have been loaded using ajax based on some user action...? Thanks and Regards.... ...

Ajax Post method using jquery

<script type='text/javascript'> $("#cart").click(function() { var loadUrl = "ajax_redirect.php"; var val = "2"; $.post(loadUrl, { page: "cart", data: val }, function(data) { alert(data); alert("Course added to Cart"); } ); }); </script> <body> `<a class="button" id="cart" href="#" title="Apply"><img src="images/button....

Handling successive Ajax requests - JQUERY

Hi guys, I have a search textbox where upon keppress an ajax call is made to return search results for the inputted text. The thing is that this results in an Ajax call being made for like every single keypress - so if I wish to type in lets say airport I get 7 ajax requests each searching for a, ai, air, airp, airpo, airpor, airport re...

this, current context-when should I use in jQuery?

Hi All, I am not very sure with the use of "this" [current context] in jquery.What I know is- it prevents the dom from searching all the elements, it just work on that current element, which improve performance[correct me if I am wrong].Also I am not sure when to use this and when not. lets say, should I go for $("span",this).slice(5...

How can I make this repetitious jQuery less so?

I have 4 blocks of jQuery that look like this: $('#aSplashBtn1').click(function(){ $('#divSliderContent div').hide(); $('#divSplash1').fadeIn('slow'); return false; }); $('#aSplashBtn2').click(function(){ $('#divSliderContent div').hide(); $('#divSplash2').fadeIn('slow'); return false; }); $('#aSplashBtn3').click(function(){...

The Jquery displays $20.099999999999998 instead of $20.1

This is the Jquery code: function Totalprice() { var unitprice=$('#unitpay').val(); var quota=$('#readers').val(); var totalprice=unitprice*quota; $('#totalprice').text('$'+totalprice); } When the value of readers is 67 and the unitpay is 0.3, it calculates the total price and displays $20.099999999999998 , not $20....

Any jquery gallery plugins fit for this?

I'm using thumbnails,when user click,show the bigger one. I checked some plugins,but they doesn't use thumbnails,say,it's the same image whether it looks smaller or bigger. ...

jQuery: Possible to wait for $.get to finish loading before continuing?

The folowing script does not wait for $.get to finish loading the page before continuing with the loop: $.each(data.songs, function(index, val) { $('#nowartist') .append('song starting'); $.get("http://localhost/play.php", function(data){ alert('done'); }); }); data is a JSON object Any ideas or comments...

JQuery validation plugin - custom validation for group of html elements

I have a set of combo boxes on a HTML form which act as a Date control: <div id="datecheck"> <select id="datecheck_y" name="datecheck_y"> <option value="2009">2009</option> <option value="2008">2008</option> <option value=""></option> </select> <select id="datecheck_m" name="datecheck_m" > <option valu...

jQuery ui tabs anchoring, how to prevent it?

Hi, I've built a tab navigation, but everytime if i try to access the a certain div using the url with the hash #, it would then anchor to the section, is there anyway to prevent it from auto-anchoring? This is happening in FF and IE but not Safari. My code looks like this. JS: $("#header").tabs({ fx: { opacity: 'toggle' } }); HTML:...

jQuery blur with an exception

I have set a focus event on an input element. When there is a focus, jQuery searches for a div and displays it. That works. Wit the blur event on the same input element I make the div hide, which also works. But when I click on a link or want to select text in the shown div, it immediately disappears because of the blur event. How can i ...