I have the following code:
function CreateRoundbox(selector, scope) {
$(selector).wrap('<div class=\"' + scope + ' dialog\"><div class=\"bd\"><div class=\"c\"><div class=\"s\"></div></div></div></div>');
$('div.' + scope).prepend('<div class=\"hd\"><div class=\"c\"></div></div>').append('<div class=\"ft\"><div class=\"c\"></div></div>');
}
Whenever I use this function and the "wrap" method is called it causes the $(document).ready() method to fire for a second time on the page. Here is the call to the function (this lives in a document ready block):
CreateRoundbox(".roundbox", "roundbox-wrapper");
Has anyone ran into this before? Am I using wrap wrong?
UPDATE
Fixed usage line, I accidentally added a dot in the scope literal