javascript - Uncaught TypeError: cannot call method 'cookie' of undefined -


this question has answer here:

please help!!! trying set cookie not working. error message says "uncaught typeerror: cannot call method 'cookie' of undefined". dont know why saying this. had before added path , domain know not causing problem.

my code

<script src="jquery-2.0.3.js"></script> <script src="jquery-cookie/jquery.cookie.js"></script> <script type="text/javascript"> $.noconflict(); //<![cdata[  var word = "hello";   var cook = $.cookie("newar", "word", {expires: 3, path: '/', domain: 'http://localhost/test.html'});  $.cookie("newar"); document.write("step 1");  //]]> </script> 

you cannot use $ access jquery methods after have said this

$.noconflict(); 

remove statement. means there else(library) other jquery using $` symbol , see in case there nothing that.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -