jquery

Which of these setTimeout format is better?

Which of these constructs is better and why setTimeout(function() { $('#secret').hide(); }, 5000); setTimeout( "$('#secret').hide();", 5000); $('#secret').show(5000, function(){ this.hide(xxx)} ); ...

trigger jQuery ui dialog from codebehind?

i wonder how i could trigger jquery ui dialog from codebehind? reason i need to do this is i need to save a file before i make the jquery call. is it possible? ...

Extracting caption from alt attribute and inserting into a div

I am using the rather lovely jQuery slideviewer 1.1 plugin on a site at the moment, but would like to extract the alt attribute from images displayed and insert them into a div at the appropriate time. The current code for the plugin is shown below for reference: jQuery(function(){ jQuery("div.svw").prepend("<img src='/template/them...

javascript browser-like GET request

I need to request web page client-side and than pass it to server as a string. I tried jQuery: $.get( "http://example.ru/", {name:"Joe", age:"42"}, function(data){ $.get( "script.php", {data:data, query:query}, ) }); }); but did not succeed. I suspect it failed because of custom ...

Jquery post callback function not working

Hi, I'm having trouble getting my callback function to work in post: I've got this in a click function. I've tried both $().click(function(e){..} and $().livequery('click', function(e) {. e.preventDefault(); $.post("test.php", {}, function(data) { alert("bang"); //doesn't register }); alert("bom"); //works fine test.php: echo "bah"...

JavaScript: Loading jQuery on Demand

What is the most lightweight way to include the jQuery lib into a page dynamically? I'm working on a page where sometimes it runs a few custom scripts (10 lines) and other times the entire jquery is also needed. ...

jquery.tablesorter.js > sorting mixed-type columns

Hi All, I have a table that has a column for Days Remaining. The values in this column are either a number, or 'TBD' (to be determined). The tablesorter plugin doesn't properly handle the sorting of this mixed-type column. How could I get this to work properly? Thanks, ~jk ...

jquery Canceling a delayed (setTimeout) event if something happend

In plain English, this code kicks in when an element is hovered over. When it's hovered over, I add a class and show the element, then after 5 seconds, I reverse everthing: i.e. I fade out what I had previously shown and remove the class I previously added. $("#it").addClass('somestyle').show(); setTimeout(function(){ $("#it").fadeO...

Jquery broken by GetResponse (email marketing) web form script

I'm working on a site that relies on quite a bit of javascript. The problem is, I'm not a javascript guru in the least. Yes, bit off more than I can chew, here. I'm using jquery for a spy effect, and use GetResponse for email signups. If I implement my GetResponse script, it breaks the area later in the page which depends on the jquery...

Google Maps JQuery Plugin Problem

Has anyone been able to get this to work? http://code.google.com/p/jquery-googlemap/ I only seem to get it to work if in debug:true, even then nothing appears like directions. I am looking for a way either in PHP or jquery to set the address and have the map set it dynamically, as it's one page with the address of many places loaded ...

jquery ie7 css height inconsistent result compared to firefox

var heightOfDIV = $thisElement.css('height'); alert(heightOfDIV); The above works as I expected it to work when I am using Firefox. It returns me the div element that triggers the above code. I get the height as 393px. however in IE7, i get auto. This is causing me issues. By the way, the above code is run in the afterExpand($thisE...

Multiple document.write from external scripts

I have a URL that generates a document.write method that inserts another JS. Example: http://domain.com/scriptONE.js Generates document.write('http://domain.com/scriptTWO.js'); How can I use jQuery to insert the second document.write to a div not an iFrame - so that my div contains only the output from this file http://domain.com...

modal window problem

Hi, I am using colorbox a jquery plugin to emulate modal window which is not able to overlay flash movies and youtube video. I have experimented with the z-index but nothing seems working. Please enlighten me on this. thnx in advance ...

jquery Accordion and flashing / jerking text.

I am using jQuery Accordion here and find some strange behavior when opening a section. The text jerks and looks dreadful for a second or so and then appears normally. This only happens when moving down and opening the next section. When I go the other way, the transition is smooth. Is there a setting that would remove this behavior? T...

How to change Css class using JQuery?

I have an multi user application with basic layouts where i want to change the layout and style of the page for individual user . I have one way in mind that to change the css at run time but if i am changing the css then it will take effect for every user and if i will refresh the page then it shows basic page again. Help me for this ...

How to get jQuery Tablesorter to sort descending by default?

I can't figure this out. This question was also asked here http://www.nabble.com/TableSorter-plugin---default-column-sort-DESC-instead--How--to25180761s27240.html#a25180761 with no response. I've tried $.tablesorter.defaults.sortInitialOrder = 'desc'; and altering the jquery.tablesorter.js file to default to 'desc' but it doesn'...

Refreshing the main page after closing a modal window

Hello guys, On a given webpage I have a link that opens a modal window using Thickbox. In that window I have a form which I use to save some data. After I submit the form, I close the modal window. Now my question is: can I refresh the main page after closing the modal window? Thank you. ...

jquery click event puzzle

This is a repeat post with more info... I create a bunch of tags dynamically, appending them to a I then add a click handler... $(document).ready(function(){ // ... code to append <a> tags to nav div $("#nav a").click(function(event){ alert('Clicked '+event.target.id); return false; }); }); If I hav...

Using JQuery to select some sibling elements

Hi all - I'm new to jquery and trying to accomplish something. My HTML looks like: <li> <div class="yes"><input type="radio" name="Group 1"></div> <div class="no"><input type="radio" name="Group 1"></div> Group 1 <ul> <li style="padding-left:25px"> <div class="yes"><input type="radio" name="Item 1"></div> <div...

jQuery UI inside ajax div

i have a site with links that look like this: onClick = ajax('link.html','contentdiv') but i want to use jquery ui tabs inside the contentdiv, i tried even to put all the code inside the html but nothing, i tried: $(document).ready(function() { $("#tabs").tabs({}); and also: $((function() { what should i put in the index.html and ...