jquery

Fix for Fix for Making conditional fields with Drupal, CCK, and jQuery.

  1. Making conditional fields with Drupal, CCK, and jQuery.
  2.  
  3. by MatteusX
  4.  
  5. I'll be posting this as a handbook page at Drupal.org.
  6.  
  7. The Conditional Fields (http://drupal.org/project/conditional_fields

Fancybox

  1. function zen_preprocess_node(&$variables, $hook) {
  2.   // Add $unpublished variable.
  3.   $variables['unpublished'] = (!$variables['status']) ?

Row id from jQuery(event)

  1. jQuery(document).ready(function(){
  2.   jQuery(".jp-play, .views-field-title").click(function(event){
  3.     // How do I figure out what "row" event was from???
  4.     jQuery.ajax(
  5.       // use the URL in

Tribune port to drupal 7 - help!!!

  1. // php code:
  2.  
  3. function tribune_page() {
  4.  
  5.   if (user_access("access tribune rss feed")) {
  6.     drupal_add_feed(url("tribune.rss"));
  7.   }
  8.  
  9.   drupal_add_css(drupal_get_path('module', 'tribune') .'/

jQuery Disaster

  1. /* This bit of code is inside a filter's processing function:
  2.  
  3.       $mod_path = drupal_get_path('module', 'counter');
  4.      
  5.       drupal_add_js($mod_path .

overwrite jquery function

  1. (function ($) {  
  2.  $.fn.fadeIn = function(speed, callback) {
  3.         alert('test');
  4.         return this.animate({
  5.             opacity: 'show'
  6.         }, speed, function() {
  7.             if (jQ

Fix for Fix for jQuery pattern

  1.  

Fix for jQuery pattern

  1. (function($) {
  2.   var self = Drupal.behaviors.foo = {
  3.     attach: function(context) {
  4.       if (!self.initialized) {
  5.         self.init();
  6.       }
  7.     },
  8.     init: function() {
  9.       // initiali

jQuery pattern

  1. (function($) {
  2.   Drupal.behaviors.foo = {
  3.     attach: function(context) {
  4.       var self = this;
  5.       if (!self.initialized) {
  6.         self.init();
  7.       }
  8.     },
  9.     init: function() {
  10.    

Fix for Using jquery cycle and lightbox in node tempalte using image field images

  1. <?php
  2.  drupal_add_js(path_to_theme() .'/jquery.cycle.js', 'theme');
  3.  drupal_add_js("
  4.   $(document).ready(function(){
  5.     $('#photos').cycle({
  6.      fx:     'fade',
  7.      speed:  2500,
  8.      t
Syndicate content