Hi !
I was using thickBox in one of my plugins, and the thing I liked about it is that it wasn't necessary to add anything to the theme files. You simply had to generate a correctly formed link, and thickBox would automatically handle it.
Now that thickBox is no more, I switched to colorBox, but I'm not really happy with it : I need to add the following piece of code into the <head> section of my theme :
<script language="javascript">
$(document).ready(function(){
$(".share_link").colorbox({inline:true, href:"#share_div"});
});
</script>
The share_div is the name of the stuff I want to be shown in the colorBox box. Is there any way to get rid of that piece ? My plugin is only one function which adds the stuff to my image page, and the link to display it in a box.
I'd like to keep it that way (e.g. only one function to call, and no other theme modification)
Comments
I can simply add the $(".share_link").colorbox({inline:true, href:"#share_div"});
line just after the share_div part, I don't have to put it in the document.ready function ! Now I works fine without theme modification
Thx though for the reply. Might help me greatly in another plugin