Dear sir,
I have searched and found that Enfold should have integrated with JqueryUI and it needs to change $ to jQuery on the coding. I just tried adding a jQuery Slider and change it to jQuery but it doesn’t work. The page cannot be loaded.
Could you please take a look and let me know what’s wrong? I just add the following simple codes suggested from jQueryUI.
<script>
$( function() {
$( “#slider” ).slider();
} );
</script>
</head>
<body>
<div id=”slider”></div>
Cheers,
Ken
Anyone can help?
Hi,
Thank you for using Enfold.
Why do you need to do this? And where did you add the code? There’s a lot of sliders available in the theme.
Best regards,
Ismael
Hi Ismael,
I want to build a form with several sliders to calculate loan amount ( sample site mentioned in the private section ). I can’t find any suitable sliders in the theme. Could you please tell me if there is any? Thanks.
Cheers,
Ken
Hi!
You have to initialize jQuery first. Example:
$(document).ready(function(){
// do jQuery
})
You can also use the wp_footer or wp_head hook instead of creating an external file.
function ava_add_custom_script(){
?>
<script>
(function($){
// do jQuery
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_add_custom_script');
Best regards,
Ismael