document.getElementById("elementId").style.display="none"
在JavaScript中用于隐藏元素.但是在jQuery中,
$("#elementId").hide();
is used for the same purpose. Which way is more efficient? I have seen a comparison between two jQuery function .hide()
and .css("display","none")
here.
But my problem is whether pure JavaScript is more efficient than jQuery?