How can i position an a div with javascript in Safari?
I need to move a div with javascript. i've tried offsetTop/Left and I've tried style.top/left. but it doesnt work. style.top/left works in IE but not safari
document.getElementBy开发者_开发百科Id('links_safari').offsetTop= 20;
document.getElementById('links_safari').offsetLeft = 150;
Your question is tagged with jQuery, so using jQuery, I would suggest changing the margin CSS property.
$('#links_safari').css("margin-top", 20);
$('#links_safari').css("margin-left", 150);
精彩评论