how about
#
#
#
$('.foo').click(function(){
var par = $(this).attr('name');
// do whatever you need with name attribution
});
Thierry-32 wrote:
>
>
> Hi,
>
> I am trying to remove every Javascript reference from my HTML data
> (except the inclusion headers of course).
> I would like
On Mon, Jul 13, 2009 at 10:18 AM, Thierry wrote:
> $(document).ready(
> function() {
> $("a.foo").click(foo());
> }
> )
This is probably not quite what you desire, as it will call foo()
immediately, not on click.
use $("a.foo").click(foo);// <--Note 'foo', reference to function, not
foo(),
Something like this could achieve what you want:
$("a.link").click(function() {
var id = this.id.split('-')[1]; // -> 1, 2, or 3
foo(id);
return false; // prevents follow through of link
});
On a side note, if you want to do a click and directly call a function
without passi
3 matches
Mail list logo