logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-18-2012, 06:42 AM   #1
ohk
 
Join Date: Oct 2012
Posts: 1
Default jquery script problem.

How to make the scroll news continuous slide?
How to make it after the third news slide continous with first news.
http://bit.ly/V94GOG

Here the script
Code:
    drupal_add_css(drupal_get_path('module', 'newsticker') .'/newsticker.css');
    drupal_add_js(drupal_get_path('module', 'newsticker') .'/jquery.scrollTo.js');
    drupal_add_js(drupal_get_path('module', 'newsticker') .'/jquery.serialScroll.js');
    drupal_add_js("jQuery(function( $ ) {
      var width = $('#newsticker').parent().width();
      $('li.newsticker-item, #newsticker').width(width);
      $('#newsticker ul').width(width*10);
      $('#newsticker').serialScroll({
          items: 'li',
          start: 0,
          force: true,
          step: 1,
          axis:'x',
          cycle: ". variable_get('newsticker_continous', 1) .",
          interval: ". variable_get('newsticker_timeout', 1000) .",
          duration: ". variable_get('newsticker_speed', 1000) ."
      });
    ". $pause ."});", 'inline');

    $output = '';
    while ($item = db_fetch_array($result)) {
      if (trim($item['link']) != '' )
        $content = '<a href="'. $item['link'] .'">'. $item['title'] .'</a>';
      else
        $content = $item['title'];

      $output .= '<li class="newsticker-item">'. $content .'</li>';
    }
    return '<div id="newsticker"><ul>'. $output .'</ul></div>';
  }
}
ohk is offline   Reply With Quote
Old 10-18-2012, 07:50 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

I have moved this to the javascript and frameworks forum
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com