Okay, I have spent the last two days working on getting the EasySlider JQuery plugin to work in my WordPress Plugin. I am porting my MoviesForMyBlog plugin to wordpress to hopefully get more users to actually enjoy it.
Here we go. This is the html portion
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#slider").easySlider({
prevText: 'Previous',
nextText: 'Next',
controlsFade: true,
speed: 300
});
});
</script>
<style type="text/css">
#slider{}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider li{
width:200px;
height:200px;
overflow:hidden;
}
</style>
<div id="slider">
<ul>
<li>1</li>
<li>2</li>
</ul>
</div>
And here is the php part.
//function to add the easy slider script
function mfmb_slider_scripts() {
wp_enqueue_script( 'easyslider', plugins_url( 'easyslider.js', __FILE__ ),
array('jquery'), false, false);
}
//adds the script to the header section
add_action( 'init', 'mfmb_slider_scripts' );
I think I made this much more difficult than it needed to be. Hopefully this might help someone out someday.
6024ce93-6f65-474e-96bc-a1ac47985326|0|.0
It is available for download at http://moviesformyblog.com. Have Fun!!
cb101e57-fa63-420c-95e3-2487665e45d3|0|.0
Posted by
jasond727 on
6/30/2010 7:08 PM |
Comments (0)
I like to go by versions and make sure it works so I have just upgraded to the version 1.5. Yes I am behind the times but I have been working on other things. It seems to have went well. I think tomorrow I will upgrade to the newest version 1.6.
409567bf-5b4e-4688-8528-3d9a900ad0c0|0|.0