WordPress.org

Support

Support » WP-Advanced » WordPress jcarousellite

WordPress jcarousellite

  • prasanna balaji

    @prasanna-balaji

    I am using jacrousellite in my wordpress theme but it is working normally but if I integrate in my theme it is not working how to make it work in my theme

    I have added the library like this in header file

    <script src=”<?php bloginfo(‘template_directory’); ?>/js/jquery-latest.pack.js” type=”text/javascript”></script>
    <script src=”<?php bloginfo(‘template_directory’); ?>/js/jcarousellite_1.0.1c4.js” type=”text/javascript”></script>

    I have created the script like this in header file

    <script type=”text/javascript”>
    jQuery(function() {
    jQuery(“.newsticker-jcarousellite”).jCarouselLite({
    vertical: true,
    hoverPause:true,
    visible: 3,
    auto:500,
    speed:1000
    });
    });
    </script>

    while I create the widget like this it is not working

    add_action(“widgets_init”, array(‘Widget_name1’, ‘register’));
    class Widget_name1 {
    function control(){
    echo ‘Scroll Testmonial’;
    }
    function widget($args){
    echo $args[‘before_widget’];
    echo $args[‘before_title’] . ‘Scroll Testmonial’ . $args[‘after_title’];
    $results = mysql_query(“SELECT * FROM wp_testmonial”);
    ?>
    <div id=”newsticker-demo”>
    <div class=”newsticker-jcarousellite”>

      <?php
      while($row = mysql_fetch_array($results)){ ?>

    • <div class=”info”>
      <b>Name:</b><?php
      echo $row[‘name’];
      echo ‘
      ‘; ?>
      <b>Testmonial:</b><?php
      echo $row[‘testimonials’];
      echo ‘
      ‘; ?>
      </div>
      <div class=”clear”></div>
    • <?php
      }
      ?>

    </div>
    </div>
    <?php
    echo $args[‘after_widget’];
    }
    function register(){
    register_sidebar_widget(‘Widget Testmonial’, array(‘Widget_name1’, ‘widget’));
    register_widget_control(‘Widget Testmonial’, array(‘Widget_name1’, ‘control’));
    }
    }

    How to make it work can any one help me?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress jcarousellite’ is closed to new replies.