Code optimisation (bxSlider)
-
Hi !
Great plugin wich is doing exactly what I need.
The only pb I have is : when I select a listing display (not a slider), the bxSlider script and sltylesheet are still inserted in the page. It make my page less optimised…
I can make a patch, but I think it could be natively implemented, don’t you ?
Regards,
Beunoit
Viewing 4 replies - 1 through 4 (of 4 total)
-
Beunoit,
You can make changes and send it to me, i will check and update the files in next version. Would that work?
Fahad
For my need, I just put this on line 125 and remove the two files from index.php :
$html = ""; if($this->list_type =='slider') { wp_enqueue_script( 'rfw-slider-script', plugins_url('js/jquery.bxslider.js', __FILE__), array( 'jquery' ), date('Ymhi'), true ); wp_enqueue_style( 'rfw-slider-style', plugins_url('css/jquery.bxslider.css', (__FILE__)), array(), date('Ymhi')); //pree($this->img_size); $html.= "<script type=\"text/javascript\" language=\"javascript\">jQuery(document).ready(function($){ $('#".$args['widget_id']." .rfw_dock.rfw_slider').bxSlider({ auto: true, adaptiveHeight: true, pager: true, controls: false, infiniteLoop: true, speed: $speed, mode: 'horizontal', pause: 10000, ticker: false, pagerType: 'full', randomStart: true, hideControlOnEnd: true, easing: 'linear', captions: false, video: true, responsive: true, useCSS: true, preloadImages: 'visible', touchEnabled: true }); }); </script>"; } $html.= '<aside id="'.$args['widget_id'].'" class="rfw-class '.$rfw_style.'">';Maybe you can do it better ! 🙂
I have just updated the version and improved as you said. Have a look here please.
Great ! Thank you ! 🙂
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Code optimisation (bxSlider)’ is closed to new replies.