0
votes
0answers
28 views

Addng Javascript files

Another question for you guys. Let me first explain that I am adding javascript files the way I think they are supposed to be added, by putting them in my template file using drupal_add_js. However, a ...
1
vote
4answers
52 views

How to get jquery working on Drupal 7 - for Newbies

I have been reading many tutorials online on how to get jquery working on drupal 7. Although there are many lines of code and examples, what i cannot find is what piece of code to put where (maybe it ...
0
votes
1answer
72 views

Having trouble adding a custom js file to my Drupal 7 site

I added a javascript file to my site in the theme's .info file scripts[] = js/myjs.js The js file loads and I can see that it's included in the head when I load the site, however the jQuery ...
3
votes
0answers
753 views

TypeError: jQuery(“#mycarousel”).jcarousel is not a function [closed]

I added this jQuery function to my drupal7 header for jcorousel plugin. <script type="text/javascript"> jQuery.noConflict(); (function($) { $(document).ready(function() { ...
1
vote
0answers
402 views

How to use an external jQuery plugin with Drupal's no-conflict jQuery

I'm using drupal_add_js() to load some external js: drupal_add_js('http://jquery-accordion.googlecode.com/svn/trunk/jquery.accordion.js', 'external'); This produces 'TypeError: $ is not a function' ...
1
vote
0answers
58 views

Why won't JS fire on ubercart checkout page and how do I fix?

I need some custom JS (jQuery to be precise) to run on ubercart's /cart/checkout page. I turned off JS optimization and tried adding it to several different files that are already loading and the JS ...
1
vote
1answer
1k views

Adding jQuery to Drupal 7 site: drupal_add_js() adds but doesn't call?

I'm using jQuery accordion effects to display some information. I include the libraries: drupal_add_js('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', file); ...
0
votes
2answers
771 views

Possible conflict with multiple jquery plugins

I have a custom module that uses the jCarousel jquery plugin (not the Drupal module). The module code up to this point works correctly, and looks like this (only the main function included for ...
0
votes
2answers
119 views

Added js file is not working nor throws it any errors

I add a js file with form_alter and #attached. Everything works fine. function ganzech_form_alter(&$form, &$form_state, $form_id) { switch ($form_id) { case ...
0
votes
2answers
869 views

How to include js file in a module which depend on jquery?

I have a module called catalog_menu I included a js file within this module in this way: drupal_add_js(drupal_get_path('module', 'catalog_menu') . '/js/catalog_menu.js'); Now in the browser I get ...
1
vote
2answers
230 views

Why is an integer variable in PHP interpreted as a string literal when passed from Drupal to JavaScript via Drupal.settings?

This is in Drupal 7. I'm attaching some JavaScript via drupal_attach_js(), using "settings` to be able to pass the "height" parameter to a JavaScript function. The height is used in a modal dialog, ...
3
votes
1answer
298 views

drupal_add_js(), script not executed

I try to include a simple script (below) and cant get it to work. (function ($) { Drupal.behaviors.myModuleBehavior = function (context) { alert('say something pretty please'); } })(jQuery); ...
2
votes
4answers
9k views

How to auto resize the height of an iframe with Jquery?

Any idea on how to automatically resize the height of an iframe based on its content. The iframe source is coming from different domain. Any thoughts on how to achieved it via Jquery or native JS? ...