ashtonsr04
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [Simple HTML Slider] Slider Direction – Right to LeftThere is only one file to edit: main.php
Step 1: add a Case “Left” after the break of the case “Right”(add the code below in your main.php)
case "Left": $toret.=" var rcount = jQuery('.shs_slider_wrp .shs_items').length; jQuery('#shs_slider_ul .shs_items:first').before(jQuery('#shs_slider_ul .shs_items:last')); var item_width = jQuery('#shs_slider_ul .shs_items').outerWidth(); var total_width=jQuery('#shs_slider_ul .shs_items').length; jQuery('#shs_slider_ul').css({'left':'-$width','width':item_width*total_width+10}); jQuery('#shs_slider_ul .shs_items').css({'float':'left'}); function shs_animate_next(){ if(rcount < 3){ jQuery('#shs_slider_ul').css({'left':'0'}); jQuery('#shs_slider_ul .shs_items:last').after(jQuery('#shs_slider_ul .shs_items:first')); jQuery('#shs_slider_ul:not(:animated)').animate({'left' : '-$width'},$trans_time,function(){}); }else{ var item_width = jQuery('#shs_slider_ul .shs_items').outerWidth(); var left_indent = parseInt(jQuery('#shs_slider_ul').css('left')) +item_width; jQuery('#shs_slider_ul:not(:animated)').animate({'left' : left_indent},$trans_time, function(){ jQuery('#shs_slider_ul .shs_items:first').after(jQuery('#shs_slider_ul .shs_items:last')); jQuery('#shs_slider_ul').css({'left':'-$width'}); }); } } function shs_animate(){ var item_width = jQuery('#shs_slider_ul .shs_items').outerWidth(); var left_indent = parseInt(jQuery('#shs_slider_ul').css('left')) - item_width; jQuery('#shs_slider_ul:not(:animated)').animate({'left' : left_indent},$trans_time, function(){ jQuery('#shs_slider_ul .shs_items:last').before(jQuery('#shs_slider_ul .shs_items:first')); jQuery('#shs_slider_ul').css({'left':'-$width'}); }); }"; break;
Step2: Add a new option in the Simple HTML WP-Admin dropdown list (copy and replace the existing select tag in your main.php)
<select name="direction"> <option value="Right" <?php shs_check_for_selected($direction,"Right"); ?> ><?php _e('Horizontal Slide','shs'); ?></option> <option value="Left" <?php shs_check_for_selected($direction,"Left"); ?> ><?php _e('Left Slide','shs'); ?></option> <option value="Down" <?php shs_check_for_selected($direction,"Down"); ?> ><?php _e('Vertical Slide','shs'); ?></option> </select>
Thats it! Refresh the Simple HTML wp-admin and select the new “Left Slide” (that was just created), Deactivate and activate the plugin, clear the web browser cache and open your web site.
Viewing 1 replies (of 1 total)