jquery

how to select an iframe from itself with jquery

I need to select an iframe with an jquery query inside the same iframe. However, I don't want to assign the iframe a unique id and use $('#'+self.name,top.document) (which i saw somewhere). Is there any relative way to do this (something with $(this) and traversing ??!?) Everything is on the same server, there is no xss. ...

Move jQuery to the end of body tag?

My friend read an article on net which mentioned that move all JavaScript file to the end of body closing tag (</body>), this is a valid point to move all JS files to the end of body tag. I have moved all JS files to the end except the JQuery and the JS files which are attaching event to an element on page, like below; $(document).rea...

Dynamic width of Table as per column

I have one table which display data as from Dynamic Content, I want to make table width 100% when there is 6 cols. and table width auto if less the 5 cols. I tried with CSS but, when there is only two cols , it expand two cols to full width while have table 100% width and looks awkward. Is there any Javascript , jQuery script available...

jQuery Lightbox or equivalent with image array

I'm trying to implement a Lightbox-style gallery where clicking a text link launches a slideshow of images that are loaded from an array, not from inline content on the page. All the examples I can find use a group of inline images that are related somehow (i.e. using a rel tag or class). I want to define my images using their paths in a...

how to add to value of an input field with Jquery

hi every one, I have a input field like below, <input name="update_price" type="text" id="update_price" value="£" size="8" maxlength="8" /> I'd like to get some price value from the value of a select box and add it after the £ sign, how is this achieved in jquery, <form> <select name="select" id="select">...

Table cell not spanning correctly

Hi, I'm having trouble with a table cell not spanning correctly. I'm using jQuery to show/hide a row of a table which contains a form, however, when I toggle the display of it, it isn't working correctly. You can see what I mean here - http://development.dekken.co.uk/bni/training/ If you click on 'confirm', the form is toggled. Howev...

Preview pop-up window using JQuery

Hi, i am doing an application like a Form builder.. I am having a design page where i am generating the Fields using JQuery and displaying them each in a Div in the Preview panel of the same page. In my code i am saving all the Fields in the Form by iterating through all the Divs in the Preview panel. Now i want to add a functionalit...

Limit to jQuery's fadeOut, and Hide effects?

Hey all, I have this big object that I'd like to fadeOut and its not working at all. It works on a smaller subset of the object, but I'm wondering if there is some internal limit on how big the element can be. Thanks, Matt ...

jquery cycle: pause multiple slideshow

<script type="text/javascript"> $(window).load(function() { $('.thumbnail_container') .cycle('fade') .cycle('pause'); }); </script> <div class="thumbnail_container"> <img src='photos/10.jpg'> <img src='photos/11.jpg'> </div> <div class="thumbnail_container"> <img src='photos/20.jpg'> <img src='photos/21.jpg'> </div> <div c...

jquery clone problem

Hi All, Can anyone tell me how can i clone an element and then change its id. Can anyone provide me with some sample code. i want to generate a clone with a different id the code given below. $("#Normal_Tag1_div").draggable({ helper:'clone', revert: 'invalid' }); ...

how to change the value of a field based on a quantity field and a select box

hi, I'm trying to update the value of a field based on a select box select option and the quantity of few quantity fields, it works fine for the first field but it wouldn't work for the rest. this is the link to the site is http://www.snappy-pizza.net/pizza1c.php if you choose a pizza for the first time and add toppings to it, the val...

jquery accordion behaves randomly in IE6

We have a page with accordions. After the page loads, we open the accordion and it shows the data correctly in IE7 and Firefox but in IE6, it does not show the data at all. When we close the accordion and open it again, the data shows up. This behaviour occurs in different ways. In some cases, it does not show any data in the accordion ...

Add javascript event to jqGrid

Hi, I'm using jqGrid plugin and I want to add onKeyPress event to each field of edit form. This code works for IE8, but fails in FF and IE7 {name: 'name', index: 'name', width: 200, editable: true, sortable: false, search: true, editoptions: { readonly: false, size: 32, 'onKeyPress': 'if($("#cbLanguage").attr("checked"))to...

Performing click event on a disabled element? Javascript jQuery

Hi, I would like to perform the click event of a element: jQuery('input#submit').click(function() { if ( jQuery('input#submit').attr("disabled") ) { alert('SUP'); } }); However this will not work as the element is required to be enabled for the click even to be executed. Any help would be appreciated, Thanks ...

Copying the contents of a div and paste it to the Preview window using JQuery

Hi, i am creating a pop-up window and i want to show the contents of a Div in the pop-up window.How to copy the contents of the Background WIndow and to make them to append it to pop-up window .Since i want to show the same preview of the backend panel in the pop-up window .How to do so. WHere, my background panel is <div id="fb_co...

Jquery to retrieve and set selected index value of html select element

I am attempting to retrieve and set the selected value of a select element (drop down list) with Jquery. for retrievel i have tried $("#myId").find(':selected').val(), as well as $("#myId").val() but both return undefined. Any insight into this problem would be much appreciated. thanks in advance ...

select random p-node via jQuery

Someone got a nice code snippet? ...

jQuery Selector Help

Hey Guys, I am pretty new to Javascript and jQuery and getting a little confused with "Selectors". Now I am sure you are all gurus and will find this trivial, so hoping you can help. I have this HTML: <div class="class0"> <div class="class1"> <div class="class2"> <div class="class3">Field 1:</div> <label...

how to add the text of a select box and the text of form input into a hidden field

Hi, I' trying to add a text of select box and the some text from a form into a hidden field,I can get the text of a select box but I can get the required text from form, can anyone help please. <form> <select name="select" id="select"> <option>Select your pizza</option> <option valu...

Jquery/Javascript Setting the attribute value of a textfield

I have a <input type='text' id='text' value='' /> How do I programmatically set the value attrribute using JQuery/Javascript ...