Hi!
Im not much familiar with coding and i have a problem with jquery.
i'm using a jquery plugin on my theme using this code on theme function.php:
function my_sticky() {
// register your script location, dependencies and version wp_register_script('my-sticky', get_template_directory_uri() . '/js/stickUp.min.js', array('jquery'), '1.0' ); // enqueue the script wp_enqueue_script('my-sticky'); }
add_action('wp_enqueue_scripts', 'my_sticky');
and then call the jquery with this code on header.php , footer.php or page.php :
<script type="text/javascript"> //initiating jQuery jQuery(function($) { $(document).ready( function() { //enabling stickUp on the '#navbar' ID $('#condition-page-menu').stickUp(); }); }); </script>
jquery plugin workes well with Twenty Fifteen theme but when i switch to my template jquery plugin stop working.
how can i find the reason ? is there some kind of conflict maybe ?
appreciate any help or suggestion .
WordPress ...
ما را در سایت WordPress دنبال می کنید
برچسب : نویسنده : استخدام کار wpss بازدید : 160 تاريخ : دوشنبه 24 خرداد 1395 ساعت: 16:00