jquery

Fix for Edit a hidden value with jQuery and have it show up in $form_values (D5)

  1. <?php
  2.  
  3. /**
  4.  * This won't work when you first submit it... the hider will still show 3.
  5.  * Change #value to #default_value on the hidden field for it to work.
  6.  */
  7.  
  8. function test_form() {

Edit a hidden value with jQuery and have it show up in $form_values (D5)

  1. <?php
  2. function test_form() {
  3.   $form['hider'] = array('#type' => 'hidden', '#value' => 3);
  4.   $form['submit'] = array('#type' => 'submit', '#value' => 'Submit');
  5.   return $form;
  6. }

Overriding autocomplete functions

  1. var myinput = $('#edit-name1').attr('autocomplete', 'OFF')[0];
  2. var db = new Drupal.ACDB('http://localhost/myproject/?q=my/autocomplete');
  3. var x = new Drupal.jsAC(myinput, db);

jQuery Form Plugin's POST is incorrect

  1. // $_POST after browser form submit:
  2.  
  3. Array
  4. (
  5.     [title] =>
  6.     [taxonomy] => Array
  7.         (
  8.             [1] => Array
  9.                 (
  10.                     [hierarchical_select] => Array

will this work with old jquery

  1.        <style type="text/css">
  2. * {
  3.     padding: 0;
  4.     margin: 0;
  5. }
  6. div {
  7.     width: 40em;
  8.     overflow: hidden;
  9. }
  10. ul {
  11.     list-style: none;
  12.     width: 200%;
  13. }
  14.     ul li {

jquery xmlrpc plugin

  1. window.jQuery = window.jQuery || {};
  2. window.jQuery.fn = window.jQuery.fn || {};
  3.  
  4. jQuery.fn.rpc = function(url, dataType, onLoadCallback, version) {
  5.         version = version || "1.0";

juery

  1. /**
  2.  * @author dereine
  3.  */
  4. $(document).ready(function() {
  5.         $('form#contact-mail-page').submit(function () {               
  6.                 if ($('form#contact-mail-page input#edit-name').val() == "") {
Rob Loach's picture

Fix for Form Input Example Plugin

  1. /*
  2. * jQuery Example Plugin 1.2.1
  3. * Populate form inputs with example text that disappears on focus.
  4. *
  5. * e.g.
  6. * $('input#name').example('Bob Smith');
  7.  
Rob Loach's picture

Form Input Example Plugin

  1. /*
  2. * jQuery Example Plugin 1.2.1
  3. * Populate form inputs with example text that disappears on focus.
  4. *
  5. * e.g.
  6. *  $('input#name').example('Bob Smith');
  7.  

Fix for Swap out javascript (jQuery) files

  1. /*
  2. From a Lullabot Workshop:
  3.  
Syndicate content