javascript - Jquery Dialog Box - to open when clicked a hyperlink -
i have jquery datatable 1 column's each cell has hyperlink
<a href = "...../path/?id=1234" > 1234 </a> <a href = "...../path/?id=1235" > 1235 </a> <a href = "...../path/?id=1236" > 1236 </a>
they cells of column in jquery datatable.
now, want open link in jquery dialog
plus
i new javascript please tell me if have
<a href = "...../path/?id=1234" > 1234 </a>
id =1234 value in href tag stored in variable have further run django queries using " id " value
just add class links, , handle click
event. instance:
<a href = "...../path/?id=1234" class="dialog-link"> 1234 </a> <a href = "...../path/?id=1235" class="dialog-link"> 1235 </a> <a href = "...../path/?id=1236" class="dialog-link"> 1236 </a>
this jquery code (make sure it's after 'document(ready)`.)
$(".dialog-link").click(function(e){ e.preventdefault(); //don't open link default behaviour //call dialog function here. });
Comments
Post a Comment