I'm not sure if this is a bug or if I just don't understand something, but I thought I'd run it past folks.
I was unable to get a module's javascript ([socialshareprivacy]) to load properly when zurb_foundation was enabled. In chrome's console, I found the error "Uncaught TypeError: Object [object Object] has no method 'socialSharePrivacy'" while in firefox the error was "TypeError: jQuery(...).socialSharePrivacy is not a function". For what it's worth, I'm using jquery 1.8.
I figured there might be conflict with something in foundation's javascript, so I uncommented js/foundation.min.js from zurb_foundation.info in order to load the scripts individually and see which one was causing the conflict. However, with all the scripts loaded individually at the same time there is no error and the module loads properly.
My understanding is that foundation.min.js simply contains all the individual component files, so I'm wondering why I get different behavior depending on if the javascript is included individually or in aggregate.
Thanks.
Comments
Comment #1
kevinquillen commentedCan you tell if it is due to javascript loading from the footer instead of the head? This is controlled in the Zurb theme - there is a hook_js_alter that moves scripts to the footer. I have noticed an issue with another module, SimpleAds, that sounded similar to yours.
Comment #2
ishmael-sanchez commentedAssuming this was sorted out and marking as fixed since there was no response to Kevin's question and it's been over 3 months.