[jQuery] Re: retrieve tr id

2009-10-09 Thread jlcox
You can use the metadata plugin to get this pretty easily. Example: $(document).ready(function() { $("._edit").click(function(){ var md = $(this).metadata(); alert(md.rowid); }); }); Untitled Document Edit Edit Edit

[jQuery] Re: Tablesorter is not sorting numbers correct

2009-09-22 Thread jlcox
You'll need to include the metadata plugin if you want to do like that. See the bottom of the tablesorter download page.

[jQuery] Re: which submit button was clicked?

2009-09-15 Thread jlcox
$(document).ready(function() { $("#button1, #button2").click(function(event) { event.preventDefault(); alert($(this).attr("id") + " was clicked"); }); });

[jQuery] Re: Jquery Starter - Need help

2009-09-14 Thread jlcox
Two things: 1. You don't have an "id" set for the loadagain button, so jQuery won't be able to find it. 2. That button doesn't exist (yet) after document.ready has completed, so you can't bind it like that. You'll need to use "live" for event delegation: Change $('#loadagain').click(function(){

[jQuery] Re: live() or click

2009-08-12 Thread jlcox
Use "live" if you have to bind events to elements that don't necessarily exist at the completion of document.load, e.g., you're loading ajax content and want to bind to elements that are dynamically added to your document. If the elements exist at the completion of document.load, then just use "cl

[jQuery] Re: "pause" jQuery.

2009-07-23 Thread jlcox
Take a look at the hoverIntent plugin. It might do exactly what you need. http://cherne.net/brian/resources/jquery.hoverIntent.html

[jQuery] Re: simple beginner question

2009-06-18 Thread jlcox
Something like this: $(".logo").hover(function(){ $(this).children(".caption").animate({opacity:"show"}, "fast"); }, function(){ $(this).children(".caption").animate({opacity:"hide"}, "slow"); });

[jQuery] Re: Submit form when hitting enter

2009-05-21 Thread jlcox
This might work: $(document).ready(function() { $(document).keyup(function(event) { if (event.keyCode == 13) { $("#myForm").submit(); } }) });

[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread jlcox
Drupal has a standard script to do this, see http://drupal.org/project/issues/date?status=All for instance. You might be able to pick apart the source code to adapt it to your needs.