Fill a bubble with the HTML of a hidden div
Hi,
I'm quite new to the jquery and javascript stuff. I used the "CreateBubblePopup", filling it with html directly in javascript. Until now, it was working fine.
For some reasons, now I need to write this HTML inside the page (in a hidden div), and then load this html inside the bubble when it's created. Here is the code :
HTML :
- <a class="bubble" href="..." >
- <img alt="Détail" src="plus.png" />
- <div class="hidden">Here is the HTML that will be displayed in the bubble.</div>
- </a>
Javascript :
- $(".bubble").each(function(){
- var popupHtml = $(this).children("div.hidden");
- $(this).CreateBubblePopup({
- ...
- innerHtml: popupHtml
- ...
- });
- });
It seams that my "popupHtml" variable is always null, no matter what the html in the hidden div is.
Do you have any idea why ? What am I doing wrong ?