Home Ask Login Register

Developers Planet

Your answer is one click away!

Satu Sultana February 2016

Jquery not working every page if I write it in cakephp default ctp

In cakephp default layout page I have linked Jquery in Head tag. Before body tag in default.ctp I have added below code


After click on left sidebar,It's working only in home page not in every page.Here I have create separate element for left sidebar.


Amit Soni February 2016


// A $( document ).ready() block.
$( document ).ready(function() {

Note:- Remove quotes with document object.

madalin ivascu February 2016

Place the script in the default layout page in the footer

Post Status

Asked in February 2016
Viewed 2,333 times
Voted 7
Answered 2 times


Leave an answer

Quote of the day: live life