In the following code is the second line redundant? doesn’t the first line return a reference to the created div? or am I missing something is there any change required to port this to jquery?
var div = document.createElement('DIV');
var div = $(div);
div.id='tip_holder';
div.style.zIndex=10000;
div.style.left='-1000em';
body.appendChild(div);
The
$adds the mootools stuff to the element. To make it redundant you need to re-write this (and I also rewrote some extra redundant code there)If you allready have a valid reference to the body from somewhere, just use
or