0
我試圖實現我的自定義模型來調用js和css..but它沒有表現出任何的結果hook_preprocess_page ...hook_preprocess_page不drupal7自定義模塊工作
module:
<?php
function wizardify_preprocess_page(&$variables) {
// define base path for our module
$base = drupal_get_path('module', 'wizardify');
// add the wizardifying javascripts
drupal_add_js($base . '/js/formToWizard.js');
drupal_add_js($base . '/js/jquery.wizardify.init.js');
// add the custom css
drupal_add_css($base .'/css/wizardify.css');
}
js file:
jQuery(document).ready(function() {
// wizardify the webform
jQuery("#webform_client_form_8").formToWizard({ submitButton: "edit-submit" });
// add the 'button' class to the next and previous links
jQuery('a.prev').addClass('button');
jQuery('a.next').addClass('button');
});