How To Activate a jquery ui dialog
-
I have a dialog script in jquery that works correctly if I hard code the script links into the header of the template.
However, I’m trying to implement the addition of the scripts through a child template.
I can get the scripts and css to appear in the header but the script no longer works, the failure mode is that the page does not complete loading. Chrome shows a repeating message saying that its waiting for…
I assume that the source of the problem is in the function.php file, shown below:
<?php function scripts () { if ( !is_admin() ) { wp_enqueue_script('jquery'); wp_register_script('jqueryUI', "https://xxxxx.com/value/_valueAssets/scripts/jquery-ui-1.8.6.custom.min.js", array('jquery')); //register custom UI library wp_enqueue_script('jqueryUI'); wp_register_script('popUpText', 'https://xxxxxxxxxxxxxx.com/value/_valueAssets/scripts/popUpText1.js', array('jquery', 'jqueryUI')); wp_enqueue_script('popUpText'); } } add_action('init', 'scripts'); //INSERT CSS files into the header function styles () { if ( !is_admin() ) { wp_register_style('jqueryUIcss', "https://xxxxxxxxxx.com/value/_valueAssets/CSS/trontastic/jquery-ui-1.8.6.custom.css"); wp_enqueue_style('jqueryUIcss'); wp_register_style('valuecss', "https://xxxxxxxxxxxxxxx.com/value/_valueAssets/CSS/value.css"); wp_enqueue_style('valuecss'); } } add_action('init', 'styles'); ?>
I’d appreciate any pointers on what I’m doing wrong.
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How To Activate a jquery ui dialog’ is closed to new replies.