Is there any way to check in sfContext whether jQuery library is already added,
using:
sfContext::getInstance()->getResponse()->addJavascript('/js/jquery-1.4.2.min.js');
or
addJavascript('jquery-1.4.2.min.js', sfView::getContext());
or
use_javascript('jquery-1.4.2.min.js');
in the templates?
Seems to me that adding more jQuery’s stops their action.
You should use your own check.
sfWebResponseaddJavascriptSo create a new
myWebResponse.class.phpfile in/lib/response/folder (create it), with this code :Then, use your new response by default. In your
apps/frontend/config/factories.yml, add:You’re done.