Integrating ALS Scroller in Webpages

Master CSS Under 1 Hour

Master CSS Under 1 Hour

Master HTML In 1 Hour

Master HTML In 1 Hour

Multilevel Drag And Drop Menu Sortable Menu In Laravel

Multilevel Drag And Drop Menu Sortable Menu In Laravel

Migrate Wordpress Website In 5 Easy Steps Under 10 minutes

Migrate Wordpress Website In 5 Easy Steps Under 10 minutes

Create Your Own News Portal In Wordpress In 30 Minutes

Create Your Own News Portal In Wordpress In 30 Minutes

Photoshop Photo Manipulation Tutorial Step By Step

Photoshop Photo Manipulation Tutorial Step By Step

25 Color Grading And Color Correction Techniques In Photoshop | Webtrickshome

25 Color Grading And Color Correction Techniques In Photoshop | Webtrickshome

How to make an Animated GIF in Photoshop ?

How to make an Animated GIF in Photoshop ?

Vertical Scroller

Vertical Als scroller is widely used in webpages to create vertical slider. It helps you a lot as a designer as it doesn't affect the responsiveness of the page. This list is composed by generic <div> elements.

<div id="vscroll" class="als-container">
	<span class="als-prev">
		<img src="images/thin_top_arrow.png" alt="prev" title="previous" />
	</span>
	<div class="als-viewport">
		<div class="als-wrapper">
			<div class="als-item"><img src="images/ps-icon.png"/>Photoshop</div>
			<div class="als-item"><img src="images/html-icon.jpg"/>HTML</div>
			<div class="als-item"><img src="images/css-icon.png"/>CSS</div>
			<div class="als-item"><img src="images/bs-icon.png"/>BOOTSTRAP</div>
			<div class="als-item"><img src="images/js-icon.png"/>JQUERY</div>
			<div class="als-item"><img src="images/php-icon.jpg"/>PHP</div>
		</div>
	</div>
	<span class="als-next">
		<img src="images/thin_bottom_arrow.png" alt="next" title="next" />
	</span>
</div>	

It's almost identical to the horizontal one apart from the div id and the fact that the contents are placed inside individual divs instead of those <ul> and <li> tags. The additional script too is quite similar to the first one.

For vertical ALS scroller, you need to wrap all of your scrolling contents inside the a wrapper with class als-container and an id. The id will activate the js script shown below while the als-container will add some styles. The als-prev and als-next class styles the navigation arrows. The als-viewport and als-wrapper class add some styles to the div where the scrolling content is placed while the als-item adds some styles to the content itself. Apart from the related css and js files you need to add some scripts for the slider in your webpage or create a new js file adding the scripts shown below.

<script>
$(document).ready(function(){		
	$("#vscroll").als({
		visible_items: 3,
		scrolling_items: 1,
		orientation: "vertical",
		circular: "yes",
		autoscroll: "yes"
	});
});								
</script>	
		

With the initialization script, you can further define the number of visible items as well as the number of scrolling items at a time. You must define the orientation to define whether it is horizontal or vertical. You can also set the scroll in loop with circular option while the autoscroll option makes the scroll run on its own.

Horizontal Scroller

Horizontal als scroller is not much famous in web designing as it's got a major bug unfixed. The contents tend to appear incomplete while the scroller goes round and round. But, it can be a good option if you need to display only one image in the slider at a time unlike the other slider plugins that allow you to display multiple slides at once. This list is composed by classical list elements <ul> and <li>

<div id="hscroll" class="als-container">
	<span class="als-prev">
		<img src="images/left_arrow.png" alt="prev" title="previous" />
	</span>
	<div class="als-viewport">
		<ul class="als-wrapper">
			<li class="als-item"><img src="..."></li>
			<li class="als-item"><img src="..."></li>
			<li class="als-item"><img src="..."></li>
			<li class="als-item"><img src="..."></li>
			<li class="als-item"><img src="..."></li>
			<li class="als-item"><img src="..."></li>
		</ul>
	</div>
	<span class="als-next">
		<img src="images/right_arrow.png" alt="next" title="next" />
	</span>
</div>
				

For horizontal als scroller too, you should wrap the scrolling elements inside same wrappers as you do with the vertical scroller as shown above followed by the initialization script shown below..

<script>
$(document).ready(function() 
	{
		$("#hscroll").als({
		visible_items: 5,
		scrolling_items: 1,
		orientation: "horizontal",
		circular: "yes",
		autoscroll: "yes",
		interval: 5000,
		direction: "left"
	});
});	
</script>			
			

Download ALS Slider zip file from here.


0 Like 0 Dislike 0 Comment Share

Leave a comment