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

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -