thanks for your time
i have the following jquery ui dialog
$(function() {
$( ".dialog" ).dialog({
title: $(this).attr('name')+'WHYYY',
autoOpen: false,
show: "blind",
hide: "explode"
});
the html is simple like this:
<div class="dialog" style="" id="helper" name="helper">
<textarea id="helper_e" name="helper_e">
some text
</textarea>
</div>
<!--and so on with multiple dialog classes with different id's and name's-->
intented to take the name as the title.
it does not work, outputing the following in title:
UNDEFINEDWHYYY
Why? thanks for a hint
Because
thisdoes NOT refer todiv.dialogas you might expect. It refers towindow.documentinstead. You should rewrite it like this: