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
You'll need to include the metadata plugin if you want to do like
that. See the bottom of the tablesorter download page.
$(document).ready(function() {
$("#button1, #button2").click(function(event) {
event.preventDefault();
alert($(this).attr("id") + " was clicked");
});
});
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(){
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
Take a look at the hoverIntent plugin. It might do exactly what you
need.
http://cherne.net/brian/resources/jquery.hoverIntent.html
Something like this:
$(".logo").hover(function(){
$(this).children(".caption").animate({opacity:"show"},
"fast");
},
function(){
$(this).children(".caption").animate({opacity:"hide"},
"slow");
});
This might work:
$(document).ready(function() {
$(document).keyup(function(event) {
if (event.keyCode == 13) {
$("#myForm").submit();
}
})
});
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.
9 matches
Mail list logo