W3C home > Mailing lists > Public > www-svg@w3.org > February 2010

Re: linking an event event CSS

From: Robin Berjon <robin@berjon.com>
Date: Wed, 24 Feb 2010 17:56:28 +0100
Cc: www-svg <www-svg@w3.org>
Message-Id: <12DBE7D7-C1CC-4C66-98D8-894C550C0048@berjon.com>
To: Rick <graham.rick@gmail.com>
Hi Rick,

On Feb 23, 2010, at 15:03 , Rick wrote:
> This may already be possible, but I don't know about it, how about binding an event to elements using CSS?
> 
> For instance, to somehow be able to link, say link onclick, globally to <rect class="dragTarget" ...>
> 
>  .dragTarget { ...; onclick:do_drag(evt); ... }
> 
> I like it. 

No, that's not something that's defined by the spec but you can do it anyway with jQuery:

  $(".dragTarget").live("click", do_drag);

-- 
Robin Berjon - http://berjon.com/
Received on Wednesday, 24 February 2010 16:57:00 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:44 GMT