function floatymessage(message){
if (!$j('.floatymessage')){
$j('body').append("<div class='floatymessage'>HERRO</div>");
}
$j(".floatymessage").html(message)
$j(".fleatymessage").css('display', 'block')
}
When the following is executed (tested with alert(‘hi’))
i do not see the div at the bottom in webkit’s inspector… I don’t see the text ‘HERRO’ either =\
did I do something wrong?
try this instead
$j('.floatymessage').length == 0writing
!$j('.floatymessage')will always befalsesince it will always be a jQuery object created from the selection with the properties found here.some streamlining….