<div class="parent"> <div class="child">HELLO 1</div> </div> 

Please tell me, when calling functions, pass the innerHTML of the child block through parent? For example, like this:

 $document.ready{function(){ ......... options = { innerHTML:$(this).children('.child').html(); }; $('.parent').CreateBubblePopup(options); }} 

.PS: I wanted to do something like this , but there is the same text in all divs, and I want different texts, well, several blocks with different texts.

    1 answer 1

    Well, almost correctly write. Only for each element the set of options will be different:

     $('.parent').each(function(){ var opts = {'innerHTML': $(this).children('.child').html()}; $(this).CreateBubblePopup(opts); }); 
    • Thank you, it works!! :) - Nurbol Mambetov