Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
7k views

Adding a full screen background image to Drupal 7 / Bartik theme

Has anyone managed adding an image as background to a Drupal 7 with default Bartik theme? Maybe using a fullscreenr plugin for jQuery? I'm not sure where to store that code best and do I need to ...
Alexander Farber's user avatar
0 votes
2 answers
1k views

looking for a slider module to use in the header

what's a good slider for a header in drupal 7 (I would like to have a slider for different content in other blocks/pages of the website, so if the same module could work for both, better)
la_f0ka's user avatar
  • 415
6 votes
2 answers
5k views

How to use Drupal.behaviors?

I am trying to do a simple ajax request when the document is ready. Along with that, I also want to provide a function that is an onclick event. Here is my code: (function ($) { Drupal.behaviors....
Kevin's user avatar
  • 28k
8 votes
1 answer
6k views

How to load a view with ajax so that additional js/css files needed by the view are also loaded?

Currently I'm using jQuery to load a view, like this: $.ajax({ type: 'POST', url: Drupal.settings.basePath + 'views/ajax', dataType: 'json', data: 'view_name=' + viewName + '&...
Temaruk's user avatar
  • 499
0 votes
2 answers
2k views

Cannot get JQuery plugin working on Drupal 7

I am trying to run a Jquery plugin QTip. The problem is that it is not running even though all the files are in the corect folders (plugin is both in info file and attched as a script below) and I ...
Vonder's user avatar
  • 713
3 votes
1 answer
674 views

How to use JQM theme and jQueryMobile plugin with Drupal?

I'm developing a mobile web site with Drupal 7 and i want to use jQuery mobile. I've found many plugins, but just one available with drupal 7 (jQuery Mobile module). I have also a jQuery mobile theme (...
user avatar
2 votes
4 answers
3k views

How can I use this code? [closed]

I'm trying to get this code to work in Drupal 7. $(document).ready(function(){ $("#sample").mouseover(function() { $(this).animate({ backgroundColor:'#f00'},1000); }).mouseout(...
Peter's user avatar
  • 21
2 votes
1 answer
740 views

Front end slider

I'm trying to create a slider on the front page of my template I have been working on. I have used the Views module to create a block. I have created a custom block for this view. I am trying to make ...
Vezu's user avatar
  • 123
1 vote
2 answers
1k views

Adding a clickable area to the logo

At my Drupal 7.4 website with the default Bartik theme and no contributed modules, I have a big logo (715 x 280 px) and no slogan. These are my settings: I'm trying to figure out the best way to add ...
Alexander Farber's user avatar
17 votes
5 answers
16k views

Add JavaScript files to the administrative pages

How do I add JavaScript/CSS files in every administration pages, using a module?
Onita's user avatar
  • 714
2 votes
1 answer
1k views

How to onclick-trigger a non-native jQuery plugin's action?

I've installed a 3rd-party jQuery plugin (it's an accordion). It displays on my page, and works as expected. I want to trigger one of the plugin's actions (open a particular slide) when I click on ...
user avatar
10 votes
5 answers
12k views

How to add conditional javascript to theme?

I'd like to use Selectivizr script to emulate CSS3 selectors in IE6-8. But I'm having a hard time adding it to my theme. So far tried: 1) Forcing this into html.tpl.php head section: <!--[if lt ...
pushka's user avatar
  • 1,853
2 votes
2 answers
503 views

How do I create a "quick post" bookmarklet for use with Drupal 7?

I'm trying to create a bookmarklet. This is not working: javascript:window.location="http://domain.com/node/add/content_type?title="+encodeURIComponent(document.title) The Prepopulate module is not ...
Cateye's user avatar
  • 21
2 votes
1 answer
598 views

WYSIWYG error when using managed_file and AJAX

I have a form that has both a managed_file element and a text_format element. Both are encapsulated in a wrapper div (using #prefix and #suffix). On submit, an AJAX callback is executed and both ...
Bart's user avatar
  • 6,944
5 votes
1 answer
17k views

Controlling the height of a jQuery accordion in content page

I have managed to add a jQuery accordion content page to my Drupal7 site by following the instructions/code given here: http://www.chrisherberte.com/blog/drupal-7-and-jquery-ui-accordion. However, ...
Renaee's user avatar
  • 51
4 votes
1 answer
3k views

How to close login-popup after successful login

I'm working on a FF-extension, that displays user-specific information on 3rd-party websites. Users need to be logged in to my Drupal-website. I'm checking login state with a cross-domain-proof jQuery....
modoq's user avatar
  • 111
3 votes
2 answers
5k views

How do get a body.onload event executed?

Background: (*) I'm a JavaScript dilettante -- I just dabble when I need to. (*) I have a piece of javascript that I've tested with a dummy page that I loaded by just calling it from a <body ...
Chris Westin's user avatar
4 votes
1 answer
4k views

How do I correctly add jQuery UI widgets?

Im using Drupal 7, which ships with jQuery UI. I need to have Accordion only on the homepage. jQuery will not just let me download Accordion and then use drupal_add_js(). Do you have any ...
hollywood3224's user avatar
42 votes
3 answers
50k views

how to send variable from .php file to .js file?

I hope someone is able to help me. The problem is the following one: 1)I have module in which a assign the variable in order to send to the template file php.tpl <?php ... $testvar="Hello from ...
Alexey's user avatar
  • 941
3 votes
1 answer
7k views

Best way for including javascript/jQuery OnLoad in EVERY page on my site

Currently, in my theme.info file I am including 2 scripts: scripts[] = js/backstretch.js scripts[] = js/scripts.js Backstretch is a jQuery plugin that allows for an expanding background image to ...
Matt Rowles's user avatar
3 votes
1 answer
3k views

First AJAX request is working very well, next takes too much time

I'm working on ajaxing my site, for a long time now. I found a method that's working for me, but only the first AJAX request is working the right way; the next request takes at least twice the time. ...
dennis605's user avatar
  • 483
9 votes
4 answers
10k views

Add JavaScript into a specific content type

I would like to know what is the best way to add a JavaScript file into a specific page basing on the content type. For example, I want to add this: <script type='text/javascript' src='http://maps....
arkchong's user avatar
  • 221
4 votes
1 answer
913 views

Are there any alternatives to drupal_add_js()?

Are there any alternatives to drupal_add_js() that permit to write inline JavaScript code?
EKK's user avatar
  • 4,350
1 vote
0 answers
465 views

Figure out the difference between loaded JS, CSS files, and files needed to be loaded for new content

I'm looking for a way to figure out what CSS and JavaScript files are loaded, and what else CSS and JavaScript files needed to be loaded for new content I'm injecting with AJAX. I've am module file, ...
dennis605's user avatar
  • 483
11 votes
2 answers
19k views

Force Drupal to attach Drupal behavior to new ajaxed content [only Drupal.attachBehaviors() is not working the right way]

I was doing lot of posts on drupal.org about this topic, but unfortunately in the wrong context. Ajaxed content is not attaching needed JS and CSS (forum) Ajaxed content is not attaching needed JS ...
dennis605's user avatar
  • 483
17 votes
5 answers
34k views

Add JavaScript at the bottom of a page

How can I add JavaScript scripts to bottom of a page, in my template?
Onita's user avatar
  • 714
2 votes
3 answers
19k views

Menu drop down in Drupal 7

I just started to learn and to develop a Drupal 7 site; therefore, I don't know Drupal very well. How can I create the menu used in these two sites, http://www.honda.com.my/ and http://www.toyota.com....
arkchong's user avatar
  • 221
3 votes
1 answer
2k views

What are the available image sliders?

I want to know what sliders are available for Drupal 7, and which ones can be used in blocks.
EKK's user avatar
  • 4,350
3 votes
2 answers
2k views

How can I use the OpenLayers module to draw a route between nodes?

I have some nodes; I need to build a route using the location assigned to them, and I want to draw it on a map. How can I do that?
yakov's user avatar
  • 49
17 votes
3 answers
6k views

Drupal 7 & jQuery -- the $ dollar sign

If I'm not planning on using any JS libraries other than jQuery, is there any reason to need Drupal's call to jQuery.noConflict() which removes $ as an alias for jQuery? Assuming there is no need for ...
maxedison's user avatar
  • 1,231
4 votes
1 answer
360 views

Javascript code appears in search results

I use JavaScript in the body of a node with some PHP code. After I run cron.php and search on the site, I can see Drupal indexes the JavaScript code contained in a node. How do I avoid Drupal indexes ...
user780's user avatar
  • 1,039
4 votes
2 answers
241 views

Is there a module that creates a jquery-like bar that displays system messages at the top of the page? [closed]

Is there a module that creates a jquery-like bar that displays system messages at the top of the page. (exactly like the large, red bar on this site (stack exchange)?
user avatar
8 votes
4 answers
6k views

jQuery UI theming

I want to use in my module custom jQuery UI theme from the themeroller. What is the best way to do it?
ya.teck's user avatar
  • 5,692
2 votes
2 answers
3k views

How can I activate a horizontal tab?

Drupal 7 has the field group module which contains a horizontal_tab.js file. Inside this file i found this written // If the current URL has a fragment and one of the tabs contains an // element ...
ayush's user avatar
  • 552
1 vote
2 answers
2k views

Can't Remove Image from CCK File Field when editing node (Throbber just spins)

I was able to upload an image, but the thumbnail didn't appear until I hit save on the form. When I try to remove the image, it just sits there spinning the throbber; if I click on "Save" in the form,...
Arosboro's user avatar
  • 1,285
2 votes
5 answers
4k views

Overlay and jQuery don't work, what should I do?

I have installed Drupal 7 on a local computer on stack called Denwer (similar to WAMP) and Windows 7; I see that all pages load without Overlay module (it is on, on modules page). I guess that jQuery ...
Vic Nicethemer's user avatar
2 votes
2 answers
3k views

Adding jQuery Tabs via template.php

How do you add jQuery tabs in a "template.php" file? I'm trying to add it with drupal_add_library('system', 'jQuery.tabs') or drupal_add_js('/misc/ui/jquery.ui.tabs.min.js'), but I'm not having any ...
chrisjlee's user avatar
  • 6,550
7 votes
3 answers
9k views

Can I attach a jquery.ui.datepicker widget to a form element using the form api?

I have a generic form element: $form['date'] = array( '#type' => 'textfield', '#title' => t( 'Date' ), ); That I want to add the jquery ui datepicker to this element. Is there a way to ...
meriial's user avatar
  • 193
1 vote
1 answer
4k views

How to add jQuery.LocalScroll to Drupal 7?

I'm trying to add smooth scrolling within a page. I did find out it could be done using jQuery.LocalScroll. What I've done so far: 1. I use Zen subtheme, so into my .info file I put: scripts[] = js/...
mivoligo's user avatar
  • 277
7 votes
2 answers
7k views

Adding JavaScript and CSS to a particular menu page

I have set up a Drupal 7 web site with a few custom blocks and menus written by me. I have a non-Drupal PHP script displaying users (some of them are external, i.e. not stored in drupal tables) as a ...
Alexander Farber's user avatar
5 votes
3 answers
2k views

External JS libraries

I have a few external js files that I call in my page, at the moment these are called via script tags in the header. I am tempted to pull these locally and include them in my themes script file to ...
Jeremy French's user avatar
14 votes
2 answers
8k views

Changes in the way Drupal 7 handles JavaScript and jQuery

I'm currently developing a JavaScript script that runs on an administration page. I read up on the changes made in Drupal 7, namely the move from document.ready() to its own jQuery function. However, ...
digital's user avatar
  • 3,228
2 votes
3 answers
3k views

Drupal caching prevents cookie read

On one of my production sites I wrote a jQuery stylesheet switcher. It drops a cookie when a selection is made and uses php to select the corresponding stylesheet on pageload which overrides styles. ...
Storsey's user avatar
  • 398
5 votes
3 answers
2k views

Views Slideshow vs list View+jquery cycle lite?

The rotating images on my work site's home page are created as a View in list format. I'm using the jQuery Cycle Lite plugin for the rotator effect. The cycle.lite.js file is set in the scripts array ...
epersonae's user avatar
  • 1,290
11 votes
5 answers
25k views

hook_preprocess_page(): how to tell a views page?

Im writing a custom module that need to insert some javascript and css files only in a Views page. Im using hook_preprocess_page, but I can not tell if the current page is from a view: function ...
Strae's user avatar
  • 890

1
16 17 18 19
20