在CakePHP中放置JQuery脚本以使其在页面加载后运行(而不是在标题中)

Just started working on a CakePHP framework, am not very familiar with this particular architecture.

I have installed Qtip tooltips after Jquery. I know that they are installed correctly, because I can trigger the correct behavior I want by running the following script in the console:

$("li.standardsList").qtip()

Seemingly, if I could only make this one script run inside Cake, all my problems would be solved.

Within the ctp (view) file, at the bottom of all the other header links, I have the following:

echo $this -> Html -> script('tagging-tool/applied-qtip.js');

And within the applied-qtip.js is the following:

$(document).ready(function(){
    $("li.standardsList").qtip();
});

Yet, I can't get that to work; I tried adding in an alert inside the applied-qtip.js, and that did fire off successfuly.

After that, I tried putting the:

echo $this -> Html -> script('tagging-tool/applied-qtip.js');

at the end of the file, and then it appeared to just not run at all.

Any ideas of where to go from here?

This was a bit hackneyed, but possibly this will help someone specifically in the future-

I removed the separate applied-qtip.js file altogether and added in the

$('.standardsList').qtip()

immediately after the creation of the item it was to be applied to (in this case, the li).

Thus, it was certain to be applied after those items were loaded, which apparently I was applying the qtip property before the items had been created.

For other cake user posterity, possibly such an item can be found in a parallel folder structure to my specific case:

app/webroot/js/tagging-tool/standards-component.js