jquery - opening new colorbox from a colorbox and sending data to it -
i want open new page color box onclick. problem in colorbox , need send parameter new page. opening colorbox normal method not working. tried , didn't work. should do?(i need send uuid 1 page in colorbox page in colorbox)
function openaddcarbox(i) { var uuid = document.getelementsbyname('uuid' + i).item(0).value; $("#colorbox").colorbox({ iframe : true, innerwidth : 500, innerheight : 300 }); $('#colorbox').colorbox({ href : 'vehicle.jsp?uuid=' + uuid, title : '', open : true }); }
try using classes instead of ids following method. i.e.
$(document).on("click", ".colorbox", function(){ $.colorbox({ href: $(this).data('url'), iframe : true, innerwidth : 500, innerheight : 300 }); })
<a href="javascript:void(0);" data-url="your link id" class="colorbox"></a>
Comments
Post a Comment