beautify vertical and horizontal html bars

This extension beautify the vertical and horizontal bars (scrolling) by javascript


  1. Developed and tested with Yii 1.1.12 but may working with older versions too.
  2. JQuery


To use the EJsScroll extension 1. extract archive in your extensions folder 2. put the above code in your view or controller file

Yii::app()->clientScript->registerCoreScript('jquery'); //if you do not set it yet
        'selector' => '#content',

'selector' is the div or whatever you want to do scrollable (default '#content') 'showArrowsBar' false or true to show box-arrows on the edge of the scrollbar (default true)

Also if you want to styling a selector (to make it scrollable) on specific action you can add this (as example)

Yii::app()->clientScript->registerCss('MyScrollPage','#content {position:relative; top:20px; height:500px; width:800px; margin:auto;}');

you could also modify jquery.jscrollpane.css and the scrollstyle.css files of protected/extensions/EJsScroll/assets/css folder to styling the scrollbar. (on YII_DEBUG = true)



Total 7 comments

#16009 report it
Komu at 2014/01/09 03:04am

Thanks man. It works great right out of the box

#15723 report it
Kostas Apazidis (KonApaz) at 2013/12/10 07:43am
Make it using simple way

There are cases the solution is more simple than we could think! :) So make it simple

Thanks spyfx for your feedback and for your comment!

#15722 report it
spyfx at 2013/12/10 06:15am
multiple scrollbars - works!

I still dont know why I didnt think about that - works pretty well. Btw great extension! keep goin on!

#15721 report it
Kostas Apazidis (KonApaz) at 2013/12/10 02:45am
,Re: multiple scrollbars

Hi spyfx

Did you try by using class instead id ?

for example replace all #content with .allbars

... 'selector' => '.allbars', ...

also add class for all html elements that you want to make theme scrollable

#15719 report it
spyfx at 2013/12/09 09:15pm
multiple scrollbars in the same view

When I am trying to add multiple scrollbars in the same view, the widget only appends on one selector, is there any workaround? or a chance to fix it?

#13385 report it
Kostas Apazidis (KonApaz) at 2013/05/27 04:09am

Thank you Rochim :)

#13382 report it
Nur Rochim at 2013/05/26 11:52pm

Hi... this is good extension scroll! thanks

Leave a comment

Please to leave your comment.

Create extension