jQuery function not found in wordpress

i have some code in simple html and it works fine but when i put in wordpress it does not work. its simple jquery slider which i am putting by hardcode in index.php

here is how i am adding script

Read More
<script src="<?php echo PARENT_URL; ?>/js/bjqs.js" type="text/javascript"></script>

here is html which i am putting in index.php file after body tag

<div class="bjqs-slider">
    <ul class="bjqs">
        <li><img src="urlofimage.jpg" alt=""></li> 
        <li><img src="urlofimage.jpg" alt=""></li> 
        <li><img src="urlofimage.jpg" alt=""></li> 
    </ul>
</div>

and here is jquery where i am calling slider function

$(".bjqs-slider").bjqs({
    animtype      : 'slide',
    height        : 250,
    width         : 300,
    responsive    : true,
    randomstart   : true
});

so when i check using firebug, it show bjqs is not a function but bjqs.js file is also loading fine. and the same code works fine in local html file

Related posts

Leave a Reply

3 comments

  1. Problem solved. the problem was in the library code. library code was like this in the start

    ;(function($) {

    and now i changed to

    $(function($) {

    and it worked fine.