jquery

running a backgound function while jquery ajax load()

I'm using jquery's load() to get some content into a div, and I want to run an other function in the "background" until load() finishes. That function should update a custom throbber every 1 second until $("#id").html() == "" where $("#id").html() is set to "" after load() finishes. Is there any way I can do that? ...

jquery $.GET multiple calls

I'm learning jquery and wrote this so I can do two seperate $.GET to a php file, retrieve some info and do some calculations on it. I understand I could create one specific php file that does everything and returns the value I need, but I thought it would make more sense to reuse this php file any time I need to retrieve info. I have...

GridView scroll position/Thickbox

I'm following a example by Matt Berseth on Master Detail using Thickbox where the thickbox will refresh the UpdatePanel of the calling page to reflect changes done of the thickbox. My GridView in the calling page is a fixed header gridview and to maintain the scroll position of the gridview, I use the following code. The problem now is...

JQuery tabbed pages content - only the first page shows the sIFR (IE + Safari/PC and Safari/Mac)

Hi there, i've just been trying to figure this out... All is well in Firefox(PC/Mac), but Safari (PC/mac), and 3 versions of IE(6,7,8) are not playing ball - please read on... Context: I have a small tabbed content area with 3 alternate content - they each have siFR headers, with exactly the same mark up. I'm using simple jQuery show(...

jQuery click(fn) won't work with input element

I want to use jQuery to detect clicks on a bunch of radio buttons. They have all been assigned a css class, foobar, to detect them. Easy, right? Still, this code doesn't work: $("input.foobar").click(function () { alert(this.id); } ); What wrong with the code above? Does this.id really return the id of the current radio button? ...

Help with jQuery UI dialog

Hi, I am using jQuery UI.Dialog. I'm having a small problem, when I click the link to show dialog box the text from #Test disappears and the modal overlay is shown but the actual modal box is not displayed. Using FireBug the dialog box is created but has Display:None so is not shown. Also, if I change this in firebug to Display:Block...

Looking for a good datagrid plug-in for jQuery

I have a requirement to let my users maintain some accounts and accommodations. Each account can 1 to many accommodations and each accommodation is link to only 1 account. I want to be able to let the users edit the account details. On the same page I would like to list the accommodations that are linked to that account and allow the us...

Optimize jQuery code

I've written this jQuery code that fades in a overlay with some links over an image. What i found out is that it is painfully slow when I add like 10 of these images. I would really appreciate some tips and tricks on how to make this code faster. If you have some tips for my HTML and CSS that would be great too ;) jQuery code $(docume...

What is the best way to develop a widget from a RSS feed ?

What is the best way to develop a widget from a RSS feed which renders uniformly across all websites and browsers which can be embedded easily on other websites without facing any problem? i have tried below approaches but each of them has their own problems Using Javascript: when embedding such widgets into other websites the style...

FlexiGrid - set width of Grid in code

Hey, I'm trying out Flexigrid (http://code.google.com/p/flexigrid/) for a new app - I'm really impressed with it but I can't find a way to set the width in code. The main reason for this is to get the GRID (not the columns inside the grid) to align fully to the size of the window. I know, it makes a mockery of the horizontal resizer,...

jQuery Slowness With Large Table Row Highlighting

I've got this little snippet that I use for row highlighting on an XSLT page that has to use an onclick event to postback some data, but because the row isn't a link I have to make sure there's a hand cursor as well as the row being highlighted so the users understand it's clickable and what row they're on. <script type="text/javascript...

How can I get the value from the last td in the tr tag in jQuery?

I have a table when I click on a table row I can fetch the row with this but how can I get the value from the last td in the tr tag? $(this); // equals my hovered tr row I thought of something like this: $(this:last-child).text(); Or should it be like this: $(this + ":last-child").text(); or with .html(); ...

Jquery Rounded Corner & Div - Remove Gap?

Can anyone tell me how to remove the gap that is generated in the middle of the div, from the following code: (paste and name test.html) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>...

Nested IF's with jQuery's help

Hi everyone, I'm brand new to JQuery - thought it might be good to pick it up for a project I'm taking part on. Basically I want to create a form of sorts, and each time a question on the form is answered, a new question appears depending on the answer. I've got a bit of pseudo code written for it and could probably write it in PHP. The...

Reference parent window document

Hi there, I'm trying to access the parent window document from a popup. <script type='text/javascript'> $(document).ready(function(){ var summary = window.parent.document.getElementById('summary'); var content = summary.innerHTML; }); </script> Is it even possible? Is there a jQuery specific way to do it? Thanks ...

ASP.NET MVC jQueryUI datepicker not working when using AJAX.BeginForm

I have an ASP.NET MVC Partial View that contains a Html.TextBox that is configured to use the datepicker from JQueryUI. This is done by ensuring the style is set to .datepicker. This all worked fine. However I have changed my forms to Ajax.BeginForm and included a Ajax.ActionLink that displays it after clicking on the link. Since addi...

How can I fade in and then set focus in jQuery?

I've got this little snippet of jQuery: $('#showlink').click(function(){ $('#linkwindow').show('fast'); $('#linkwindow input').focus(); } How do I call the focus only after the fade has ended? Sometimes it happens slightly before and I end up with a weird rendering bug. ...

To use PHP templates or jQuery AJAX calls?

This is a snippet from my index.php page, where I'm displaying a menu with three HTML links. Selecting a menu item defines the page parameter, which the PHP templating logic then loads, populating into <div id="main">. <div class="span-24" id="menu"> <table> <tr> <td><a href="index.php?page=races">Races</a></td> <td>...

jQuery autocomplete: How to call a getJson after something is chosen in the result?

Hi!! I have a form and the "Name" input text is using jQuery autocomplete. What I needed was when I select a name in the list result of autocomplete, I fill the other input texts (date of birth, telephone etc) based upon the name selected. Does anyone know how to make this second ajax call after a name is chosen? thanks!! ...

jQuery catch paste input

I'm looking for a way to sanitize input that I paste into the browser, is this possible to do with jQuery? I've managed to come up with this so far: $(this).live(pasteEventName, function(e) { // this is where i would like to sanitize my input return false; } Unfortunately my development has come to a screeching hold because of this...