Skip to content Skip to sidebar Skip to footer

Jquery Code Works On Codepen/jsfiddle But Not Html Page

My code for collapsible jquery div works on codepen and JSFiddle, but when I copy everything to my page (content adapted), the div does not expand. What am I missing, or where did

Solution 1:

You need to wrap your code inside ready handler:

$(document).ready(function(){
     //your code here
});

Or,

$(function(){
   //your code here
});

Post a Comment for "Jquery Code Works On Codepen/jsfiddle But Not Html Page"