简体   繁体   中英

jquery pass the click event to onclick property

i have the following tag:

<a href="#" class="btn btn-xs userView" onclick="viewUser('+id+')">Se mere</a>

Now i want to pass the click event just like you would do with jquery:

     $('.checkbox_input').click(function(e)
 {
 })

So that i can have the following function

    function viewUser(id,event)
{
         event.stopImmediatePropagation();

}

So pass in event

onclick="viewUser('+id+', event)"

Check out JSBIN DEMO

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM