Capturing .click For Urls
I am relatively new to Javascript/Ajax. When the user clicks on certain urls, I wish to handle the click entirely with Javascript/jquery. Copy
Solution 2:
If you are implementing for modern browsers which support "data-" (HTML5) then you can use such attributes
<aclass="row_edit"data-url="/sales_item/edit/{{ item.id }}"href="#"></a>
and modify the javascript to get the appropriate attribute value
var url = $(this).attr("data-url") + "/";
Solution 3:
<ahref="#"> click me </a>
'#' for blocking clcik
through jquery block the default event.
add your new event handler.
Refer Link(jquery):-
Post a Comment for "Capturing .click For Urls"