Hi I have a function in an external js file called ‘nsslider’. Its just a simple slider.
The external js script is setup like below
(function($){
$.nsslider = function(element,settings){
//All my script is here
};
})(jQuery);
I am trying this on my HTML page and it doesn’t work
<script type='text/javascript' src='slider.jquery.js'></script>
<script type='text/javascript'>
$(document).ready(function(){
$.nsslider(
'#slider',
{
'auto' : true,
'auto_delay' : 4000,
'slide_speed' : 500,
'looparound' : true,
'controls_hide_delay' : 1000
}
);
);
</script>
Any ideas on this, I’m not great with javascript and it’s quriks. Much appreciated.
If it’s a jQuery jQuery plugin. Also make sure you added jQuery to your source.
I think it should be called like:
Do you got a link to the plugin?