jquery

JQuery's appendTo is very slow!

I have a html table that I reorder based on a CSV list of custom attribute values that I have for each table row. I am using the following function to do it: for (var i = 0; i < arrCSV.length; i++) { $('#' + tableId) .find('[fname = ' + arrCSV[i] + ']') .eq(0) .parents('tr') .eq(0) .appendTo('#' + tableId...

should jquery tabs be inside document.ready?

I am a little confused as to what exactly document.ready does. According to the tutorial by john resig, document.ready should contain code that needs to be ran when the page is done loading. What if I have code that declares tabs..or code that puts zebra stripes on tables? should all that go under document.ready? Wont' there be cas...

jquery easywidgets after drop widget then their style changing

Hi everyone, I'm trying to use jquery easywidgets plugin, When i tried to drag and drop on the any widgets, divs style changing, especially texts are pixelerate. you can also see on the pictures. Before drag After drag What can i do for solving that problem ? Thank you ...

transparent png over jpg problem in IE7

I have jquery hover function which a transparent image will animate up. The following website http://www.okadadesign.no/vitaveritas/ shows a demo. Please hover over a girl's image. In FF, IE8 etc, a magnifying glass which is png-24 comes up, but in IE7, nothing happens. Can anyone help me how to solve this problem? Thanks in advance. ...

dynamically hiding a portion of a HTML table

I have a table of data from mysql rendered on page via PHP into a HTML table. Within this table of data, I have a row of data that should be focussed on (let's call it) row X. I want the 2 rows above and below row X to be shown but all others hidden, as row X moves up and down, this would change (obviously) what was hidden, when row X...

jQuery Sticking Fade On Clicks

I have three divs with the class 'thumbs' and they are used to select products. I'm currently using the following code to highlight the current choice: $('.thumbs').hover(function(){ $(this).stop().fadeTo("normal", 1.0); },function(){ $(this).stop().fadeTo("slow", 0.5); }); By default all choices are at 50% opacity, when y...

How to toggle a div based upon the radio type selection?

Hi I toggle a div using something like this - <input type="radio" name="myRadio" value="myDiv_1" />MyDiv <input type="radio" name="myRadio" value="myDiv_2" />MyDiv2 <input type="radio" name="myRadio" value="myDiv_3" />MyDiv3 <div id="myDiv_1"> 1 Some input fields, text </div> <div id="myDiv_2"> 2 More input fields, text </div> <div i...

firebug reporting reference to undefined... jquery.cache [id] [name]

I am trying to learn javascript/jquery, using firebug to debug and have built a page, which I have reduced to a minimal below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script src="jquery-1.3.2.js" type="text/j...

Jquery Tablesorter in ruby on rails

I am using Ruby on Rails and have a table that I am trying to sort. The tablesorter jquery plugin and it is properly loaded in my files. I have jquery called in front of it at well. I have this code in my javascript. $(document).ready(function() { $("#myTable").tablesorter({widgets: ['zebra']}); $("#business").tablesorter({sor...

jQuery with quicksearch plugin performance problems

I'm using the jQuery quicksearch plugin to search for items in a table of data. Very slick and works fantastically well when there are a reasonable number of rows. (Reasonable number: Less than 200 rows with 10 columns which an average of 20 characters per cell.) When I increase the number of rows performance drops off and it becomes ...

inline editing with jquery

Hi, Are there any guidelines on doing 'inline' editing with jqeury? I know I am not using the correct term here, but basically you click on a some text and dynamically the area changes to an editable input box with a submit button. Is there any built in capabilities with jquery? ...

JQuery Modal Box Positioning

Alright. I am using a Modal box pop up window to display business details of a dynamic table. This table is very long. Everything works right with the modal box, but if they are say scrolled to the bottom of the page, it always opens the Modal box at the very top of the page. So they would have to do a lot of scrolling back down this w...

Detecting the exact moment an element appears in the DOM

Is it possible to detect the exact moment an element exists in the DOM on page load? Context: On page load i hide an element of my page using jQuery (i.e. If JavaScript is available i want to hide the div) but on poor internet connection you see the panel for a second or so before it disappears. I'd like to hide the element as soon as ...

Select not Selected

I have a form with 4 dropdowns on it. The default selected option in all the dropdowns is "Please Select". I want to use Jquery to make sure all dropdowns have a value before the page is submitted, but my code only works on the first one. Does anyone have a way that I can check all of the dropdowns at once? function doconfirm() { if (...

facing a problem with jquery ui tabs strategy

My requirement was to develop a page that will have three tabs. First two tabs will have pages we already have in our site and third tab will be new page. So, because I wanted to utilize two pages we already had. I decided to go with ajax feature of jquery UI tabs. Code looks like this: <div id="tabs"> <ul> <li><a href="/failedR...

jQuery Validation plugin error messages at END of list for checkboxes

Hello all. I am using the Validation Plugin for jQuery and it works wonders. Except when I have a group of checkboxes...the error messages will display right after the first box...like so and that is after I have created a "hidden" checkbox at the beginning of the group. Is there anyway i can make it display after the LAST checkbox? Is ...

jQuery add blank option to top of list and make selected to existing dropdown

So I have a dropdown list <select id="theSelectId"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> This is what I would like <select id="theSelectId"> <option value="" selected="selected"></option> <option valu...

Using jQuery to change input button text back after a few seconds

I'm using a form and jQuery to make a quick change on a web site. I would like to change the button text to 'Saved!' then change it back to Update after a few seconds so the user can change the value again. Of course they can hit the now 'Saved!' button again, but it doesn't look nice. $("form.stock").submit(function(){ // Example...

jQuery html() and new line characters

I'm using jQuery with rails and have the following piece of code $('#related').html("<%= render :partial => "related_items" %>"); I'm having a problem in the browser where the content of the #related element is only being replaced when there are no line breaks in the partial. This isn't too much of a big deal, I can place everything ...

jQuery inArray is always returning -1

I cannot figure out why I keep getting -1 for lastProductIndex when clearly the lastProductID is in the array! var lastProductID = 6758; var allProductIDs = [5410, 8362, 6638, 6758, 7795, 5775, 1004, 1008, 1013] var lastProductIndex = $.inArray(lastProductID, allProductIDs); ...