jquery

Is it possible to add a value to a hidden text box field in JQuery

Hi all, Recently, I came across a web page where someone asked how to add some value to a hidden field. Since I am new to JQuery, I tried using Javascript instead and came up with this code: <html> <head> <script type="text/javascript"> <!-- function t() { document.testform.testfield.value = "helloworld"; } --> </script> </HEAD> <body...

Adding a function to onclick event by Javascript!

Is it possible to add a onclick event to any button by jquery or something like we add class? function onload() { //add a something() function to button by id } ...

jQuery - move element with javascript inside

Hi I'm using jquery to move a element that contains javascript code inside it, like this: <li class="a1"> <div class="el"> <script type="text/javascript"> document.write('Hello World'); </script> ... </div> </li> <li class="a2"> </li> <a class="trigger">link</a> so I attached a click event on a.trigger that will mov...

Triggering FancyBox from ASP.Net Codebehind

Hi, I want to use the JQuery FancyBox on an asp.net page but all the examples I have found show triggering a fancybox from anchor tag (< a >). I am not able to find an example where a fancybox is triggered from codebehind. To be more specific, I create a pdf file on the fly on a LinkButton click. After the file has been created, I want...

When exactly the $(document).ready callback is executed?

Suppose that we attach a .click() handler to an anchor (<a>) tag in the $(document).ready callback. This handler will cancel the default action (following the href) and show an alert. What I would like to know is when exactly the callback will execute and is it possible for the user to click on the anchor (the document has been shown i...

Jquery copy text from classes in table row with radio checked to input fields.

I'm working on store locator of sorts. It is integrated into an order page. The customer inputs their zip and stores around them are displayed in a table with ten rows. I've already set up radio buttons on the end of each row so that the user can select which location they'd like their product shipped to. Each row has the store name, add...

use slideDown after image loads...

i use gpgraph library for charts drawing. i need to dinamicaly create graphs, so i use jquery for it. Look at this script please $("#graph").click(function(u) { var f = 502; //just for example $("#graph_content").html('<img src="mygraph.php?value1='+f+'" />'); $("#graph_content").slideDown(600); u.stopPropagation(); }); in my...

change the value of onclick with jquery

Ok, so...i've a button with onclick. <input id='post-favorite' onclick='Post.Favorite(15,"set");' type='submit' value='Favorite'> but i need to change the onclick value when it's clicked to Post.Favorite(15,"unset"); there is a way to do that? Because i've read in some places that is inpossible, intead use onclick use jquery click ev...

Group a collection of elements in Colorbox

I'm using the colorbox plugin and I'm trying to group a collection of elements. I doing something simliar the basic grouped photos in the examples (click any of the grouped photos). Instead of using images, I'd like to use a html div. The examples html/js looks something like this. js $("a[rel='example1']").colorbox(); html <p><a...

Trying to select all but the 1st TD'd in the last row in a table using JQuery

I have a table that contains totals at the end. I need to select all TD's in the last row except the 1st TD which says the word TOTAL. This does not seem to work, any idea's? $(".tableclass tbody tr:last(td:not(first-child))").css({'color':'#FF0000'}); Thanks ...

jQuery/Ajax call - It Doesn't work on IE7

Hi... i make a Jquery function that (for the moment) call a function dinamically and print it with an alert. with firefox, chrome : it works! when i try on IE7 (the first time), it fails. If i reload the page (F5) and retry , it works! o_O I FINALLY understand why that's happen. In my old website i used the jquery-1.3.2.min.js library. ...

Wrap first level of "li" tags into one div using Jquery

Hi Have the following question: Say we have a multi-level html list that looks like this: <ul class="catalog"> <li> <ul> <li> <ul> <li>subcat subcat 1</li> <li>subcat subcat 2</li> <li>subcat subcat 3</li> </ul>...

Using JQuery to dynamically resize a 2-column HTML page causes infinite cycle on IE6.5

I am writing a web page that has a vertical menu bar on the left hand side and a main content pane on the right. I used CSS floats to accomplish this, but when the page is resized, the content can get "pushed under" the menu. To correct this, I used jQuery to dynamically resize the content pane, and it seemed to work well in FF3, Chrom...

jquery add/remove editable columns and check total

Hi, I need to build a table in this way: -list of services (from a grails query) and its price. At the end a field with the total -editable column to add/remove where to insert amount. So it'll be person 1, person 2.. -the number of row depends of the query result -on submit control to check if the total of the column it's equal to ...

In jQuery, How to fix containment bug when using resizable() and draggable() simultaneously?

In jQuery, How do you fix containment bug when using resizable() and draggable() simultaneously? It seems as though the left offset and top offset of the containment for resizable is buggy if you use draggable on the same object. I have looked this up on google and a few people had the same problem, but no answers. If anyone could hel...

getting paragraph value in jquery

how to get the value of this paragraph in jquery <p class="editableText" id="$bid">$content</p> $(document).ready(function(){ $('p.editableText').each(function(){ var content = $(this).val(); }); }); is this a correct approach ?! ...

jQuery - call a function anytime a user changes any form input?

I have a page that has multiple forms. Anytime the user clicks an input or modifies text in an input I would like a function to be called. Any ideas on how to do this efficiently and in a way where it doesn't require the form IDs? ...

multiple div ajax load

I have multiple divs in a page whose content gets loaded via ajax. I would like to show a loading gif that does the following, basically ajax_load_comments and pics are divs with animated gif backgrounds (in comments and pics container respectively), that show up on ajaxStart and hide on ajacstop. Problem is they both show up regardless...

JQuery $(document).onClick doesn't work when clicking an <embed> flash on IE (but it does in FF)

Hi guys This is the scenario: I'm developing a dropdown widget in Jquery. I have to say it was simple. The main problem was to catch when the user clicks outside my widget to make it hide its list. I found this code here: onClickOutside : function(event, e){ var thisObject = this; var clickedOutside = true; // check if the ob...

target input by type and name (selector)

I need to change some checkbox inputs to hidden inputs for some but not all inputs on a page. <input type="checkbox" name="ProductCode"value="396P4"> <input type="checkbox" name="ProductCode"value="401P4"> <input type="checkbox" name="ProductCode"value="F460129"> The jquery code below only selects the input by type which causes all...