How's about: var foo = $('#mylabel').attr('onclick');
On Jun 10, 4:32 am, "chudin...@gmail.com" <chudin...@gmail.com> wrote: > <label id="mylabel" onclick="myOnclickFunction()">My Label</label> > > How to get the "myOnclickFunction()" _string_ with jQuery? > > JavaScript getAttribute("onclick") works fine, but I want to do it > through jQuery.