SyntaxFix
Write A Post
Hire A Developer
Questions
You are missing # hash character before id selectors, this should work:
#
$(document).ready(function() { $("#div2").hide(); $("#preview").click(function() { $("#div1").hide(); $("#div2").show(); }); });
Learn More about jQuery ID Selectors