Javascript help required for a custom module.
Posted by aac on March 15, 2011 at 11:23am
I have created a custom module and using hook_form_alter() to do the following-
<?php
$form['title']['#prefix'] = '<div id="title-ajax-check-wrapper">';
$form['title']['#suffix'] = '</div><div id="title-ajax-check-message"></div><div id="title-ajax-check-informer" class="title-ajax-check-informer"> </div>';
?>
Now in my js file i am using the following-
<?php
// $Id: title_ajax_check.js$
Drupal.behaviors.titleAjaxCheckBehavior = function (context) {
$('#title-ajax-check-wrapper input:not(.titleAjaxCheckBehavior-processed)', context)