I need to get the javascript code below to work with any of the following links:
<a href="#" class="example1">http://example.com</a>
<a href="#" class="test">Doesnt work now</a>
The code that is displayed after the link is clicked:
<div style='display:none'>
<div id='example1' style='padding:10px; background:#fff;'>
<a href="http://example.com" target="_blank">Link</a>
</div>
</div>
The javascript code I need condensed to work with any class/id values I give:
<script>
$(document).ready(function(){
$(".example1").colorbox({width:"50%", inline:true, href:"#example1"});
$(".example2").colorbox({width:"50%", inline:true, href:"#example2"});
$(".example3").colorbox({width:"50%", inline:true, href:"#example3"});
$(".example4").colorbox({width:"50%", inline:true, href:"#example4"});
$(".example5").colorbox({width:"50%", inline:true, href:"#example5"});
});
.colorboxto be used or is there another function not shown?.colorboxis a plug-in