jquery

jquery select all checkboxes inside a tab

I have several tabs. Each tab has several nested elements that contain checkbox input elements. I need to be able to select all / none of the the checkboxes within the selected tab. I was hoping this would work: $("#tabs").tabs().data("selected.tabs").('input[@type=checkbox]').attr('checked', 'checked'); But it doesn't. I was thin...

What's the difference between e.preventDefault(); and return false?

$("a.avatar").click(function(e){ e.preventDefault(); $("#thumbnails").fadeIn(); }); and $("a.avatar").click(function(e){ $("#thumbnails").fadeIn(); return false; }); Both can achieve the same goal for me. ...

How Can I Add a Class to the Body Tag using jQuery?

Let me clarify my question, and the solution I'm looking for. I'm using wikispaces.com, and I would like to dynamically add a unique body class for every page using jQuery that somehow grabs the URL, and then inserts that unique body class that would be applied specifically and only for that page. So, here's an example url from my wiki...

how to remove matched tags but leave content with JQuery

I have HTML like this: <div> <div class="a"> content1 </div> content 2 <div class="a"> <b>content 3</b> </div> </div> and I want to get rid of the div's of class="a" but leave their content. My initial attempt was: $("div.a").replaceWith($(this).html()); However this is undefined. How would you do this? ...

jquery how to wrap every fifth element

Hello i know i can do that in the hard way by using for loop or something like that but i'm asking if : there is any simple way to wrap every 5 images in a long list of images Thanks ...

Passing arguments from one asp.net page to another using jQuery

Hi I need to pass 4 arguments (3 strings and one comma separated list) from an ASP.NET page to another ASP.NET page using jQuery. The destination page ought to be launched as a separate window, which works fine with the following jQuery snippet: $('#sourcePageBtn').click(function(){ window.open("destinationPage.aspx"); return fal...

jquery anchor detect & prepend

Within an anchor, this works: $(this).prepend('<span>This is the span content</span>'); when trying to do if href equal to, it does not work $('a[href="http://www.google.com"]').prepend('&lt;span&gt;You have selected Google</span>'); ...

PHP and IE browser display problems.

I can't seem to figure out this problem for some reason my piece of code (no votes cast) will be displayed if there are no votes casted in Firefox but not in Internet Explorer I was wondering if some can show me how to fix this problem so the code is displayed in both browsers? I'm using JQuery and PHP. Here is the PHP code. // functi...

How to take snap shot of a <form> in jQuery?

There are multiple <input /> and <textarea> in the <form>,but none have their id or name. Is it possible to take a snap shot of every thing inside the <form> and render it when need? ...

JQUERY FIND:FIRST not finding the first Paragraph?

Goal, is to extract the content for the CKEDITOR Text Editor, and then only obtain the FIRST paragraph. For some reason the bellow isn't working... Ideas? Given the following JavaScript: var newTitle = CKEDITOR.instances.meeting_notes.getData(); newTitle = $(newTitle).find("p:first").text(); ...

is it a good idea to put all javascript file's content into one file to reduce server request and keep at bottom to increase performance?

I use simple javascripts, jquery library and many plugins , should i make one file for all if yes then what we need to "just copy and paste and code from all file into one in needed order" or any thing else need to be considerd. as stated here http://developer.yahoo.com/performance/rules.html#num_http Combined files are a way to red...

Find clickable world maps

Can I get something like this http://myffi.biz/ , which selects the continents when I hover on the languages? I have searched a lot for this kind of map but have not been able to find any. ...

JQuery Rating Internet Explorer Problem.

Now if there is no vote casted yet my rating script will not work in Internet Explorer I would not be able to click the star and have its value entered into the database and displayed on the browser. But if there is one vote already casted the script will work in Internet Explorer perfectly. How can I fix this problem so that if there ...

jQuery & PHP - Update current table view with the next records automatically when record(s) in existing view are deleted

Hi all, PLATFORM: PHP, mySQL & jQuery WHAT I HAVE: I have a Database table. Within my application, I am able to fetch all the rows. When I am querying the database, I have set the records fetch limit as 30, but that can be changed via a dropdown list. So consider that I am fetching upto 30 rows of data in a single query and displayin...

is there any downside to add content text through javascript other than it will not shown when if javascrit is disabled?

is there any downside to add content text through javascript other than it will not shown when if javascrit is disabled? for example like this http://stackoverflow.com/questions/1899913/how-to-detect-linked-pdf-on-a-page-and-show-message-to-download-adobe-reader-usin/1899938#1899938 if text will not shown to javascript disabled use, no...

How to change serialized data into key/value paires efficiently in jQuery?

q=search&title=&post-text=&fkey=12e8c18672ab30ae7977a95f872dc77d&author=&i1l=yaF751&tagnames= ...

anchor tags and image maps

how can i associate an anchor tag with image maps? Suppose, I hover over an anchor tag, it should select the mapped region on the image. Something like this http://myffi.biz/. This is in flash, but can this be done using image maps? You hover over on the links and it should select the mapped region on the image. Is this possible? I ho...

How to Introduce jQuery auto complete for drupal5

Hey I am new to Drupal. Can someone help me to introduce jQuery auto complete into a drupal text field. I prefer basic coding standards. ...

How to make these radio buttons in the same <li> exclusive in jQuery?

<li> <label><input type="radio" name="radio1" value="1">radio1</label> <label><input type="radio" name="radio2" value="2">radio2</label> ... </li> <li> .... </li> I tried this but failed: $('input[type="radio"]').click(function() { var $self = $(this); $.map($self.parents('li:first').find('input[type="radio"]'),function(n,i){ ...

how to calculate page rendering time with or without any javascript or with multple javascript seperately

how to calculate page rendering time with or without any javascript or with multiple JavaScript separately? I want to know how much page will go slow if i use any javascript/jquery with plugin/ multiple javascript/jquery plugin files etc.? javascript code in any form inline, in-page code, external file. ...