I am using jQuery Update to bump up the jQuery version on the front end, and keep the default 1.4 on the backend.
On a custom filter form on the home page, i use jQuery on, and wrap it in a behavior so it still works after an ajax event on that page.
The problem is that for some reason, when editing the page, and adding a new field collection row when Ajax is fired, the jQuery is being called, and an error happens because jQuery on did not exist in 1.4.
VM787:31 Uncaught TypeError: $(...).on is not a function
Steps to fix...
I am using drupal_add_js but I check that if
(!path_is_admin(current_path())) {//jQuery}
to make sure it isnt called on the admin pagesI am certain the JS is not on the admin pages, but after ajax, it is called because its in a behavior.
Is there a way to say which behaviors should run on the admin side, and which shouldnt?