www.webdeveloper.com
Results 1 to 5 of 5

Thread: installing jquery plugins

  1. #1
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293

    installing jquery plugins

    I found a plug in on the internet made in jquery and i want to use it. its called stars.

    it can be found http://justcoded.com/blog/jquery-mag...sor-animation/

    I installed the download to an external .js file and referenced in my index page. now i need to configure the plug in so it works.

    he shows to configure it like this

    $('#container').jstars({
    image_path: 'images', // folder with star image
    style: 'white', // optional, star color, default = white
    frequency: 5 // optional, from 1 to 19
    });


    assuming container was the div where would i put this?????

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,674
    http://labs.justcoded.com/jstars/

    if you look at the demo page code you'll see the answer )

  3. #3
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293
    so ust add this tot he head of my index page?

    <script type="text/javascript">
    $('#stars1').jstars({
    image_path: 'images', // folder with magic image
    style: 'white', // optional, magic style, default = white
    frequency: 5 // optional, from 1 to 19
    });
    </script>

  4. #4
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,674
    http://ilolo.ru/wd/diaz/ here is your samle page with the stars. for some reason the stars didn't work with jquery-1.9.1 but it works with jquery-1.5.1 which goes together with the plugin... so you need these lines in the head section

    Code:
    <link rel="stylesheet" href="jstars/css/all.css" type="text/css" media="screen" />
    <script src="jstars/js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="jstars/js/jquery-stars.js"></script>
    and these lines in your $(document).ready()

    Code:
    $('#myDiv').jstars({
    image_path: 'jstars/images',
    style: 'red',
    frequency: 19
    });

  5. #5
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293
    ahhh so older versions may not work with newer versions

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles