1

Topic: JQuery conflicts

I was wondering if anyone else has encountered this and found a work around.

I need the new Indicia based site to be responsive to mobiles but for the 'superfish' menu to work properly on mobile devices jquery needs to be set to at least 1.9 (it won't toggle at all, i haven't figured out why yet).

But the Indicia google map and display of recent records (for example) won't work if it is set to more than 1.8.

So at the moment i either have working map or a mobile usable menu! any ideas?

At 1.9+, up until upgrading to the new maps API (http://forums.nbn.org.uk/viewtopic.php?id=5934) it was still displaying the interactive map, but not the records. With the new API i get a white background.

Natural History & Biodiversity Data Enthusiast

2

Re: JQuery conflicts

Tricky.

Have you got the latest version of the Iform module from the code repository?
I know John has made changes for compatibility with newer versions of jQuery.

Are you using Adaptive Themes or a sub-theme thereof? There could be a conflict with Superfish.
Adaptive Themes provides a Menu Toggle for Mobile independent of Superfish.
It says "If you start using the Superfish module you should re-save the theme settings. Also enable the sf-Touchscreen plugin for your Superfish menu block."

http://icpvegetation.ceh.ac.uk/record/online-form uses Superfish menus / jQuery 1.10.2 / Indicia / Zen theme.
http://www.brc.ac.uk uses Adaptive Theme / jQuery 1.7 without any Superfish (or Indicia).

Jim Bacon.

3

Re: JQuery conflicts

Hi Jim,

I am using the AT Indicia subtheme and updated the iform module not too long ago but knowing the rate of John's tinkering perhaps i should update anyway!

sf-touchscreen seems to work ok by itself. But with such a chunky menu its a bit impractical on a mobile device which is why i was at sf-smallscreen or a toggle which is where my JQ issues arise.

It may be that i have to use mobile detect and drop the block altogether and put a mobile specific menu elsewhere but i'd prefer to keep things simple!

i'll update iforms and see, thanks for the reply.

Natural History & Biodiversity Data Enthusiast

4

Re: JQuery conflicts

Are you following the recommendation at https://www.drupal.org/project/superfish to use the dev version of the Drupal module and the master branch of the library?

Jim Bacon.

5

Re: JQuery conflicts

yes on both counts

Natural History & Biodiversity Data Enthusiast

6

Re: JQuery conflicts

Hi Ben
I don't think there should be any problems running Superfish on jQuery less than 1.9 - it is switching OK on several other sites including iRecord. Are there any JavaScript errors on your page? Also, I have indeed done a fair bit of work on making Indicia work with jQuery 1.9+ (which introduces quite a few differences) so you would want the latest code if doing this - however I've not tested all areas of functionality. If you are getting problems then send me a link to the page and I'll see if there is a quick fix to apply to the code.
Best wishes
John

John van Breda
Biodiverse IT

7

Re: JQuery conflicts

Hi John,
I've updated the iform module but things are still misbehaving (though not in an urgent and/or disastrous way!);

No matter the JQuery setting i can't get the theme menu toggle to work (or sf-smallscreen)
On 1.9+ the interactive map (e.g. enter a record) still disappears
On 1.9+ i have also just noticed that the indiciatheme colour settings aquire a locked icon (though they still seem editable)

For now i am happy to stick to 1.8 as the menu renders 'ok' and is usable on a mobile device, just looks a bit cluttered but everything else works.

There is now a pretty hefty log of errors which i'll start to work through though none seem to relate to js.

Natural History & Biodiversity Data Enthusiast