With a little side of applesauce...

Friday, August 24, 2012

Drupal - using JQuery in custom functions

For anyone this is getting the following error:

 Uncaught TypeError: Property '$' of object [object Window] is not a function

yet sees that jquery.js is being loaded before their custom javascript. You will need to wrap your jquery syntax a la:

function toggleSelectedWorkshop(id) {
    (function ($) {
        if ( $('#selectMe-'+id).is('.selectedWorkshop')) {
        } else {


No comments: