Andy-H Posted January 13, 2012 Share Posted January 13, 2012 $.fn.extend({ slider : function(options) { var settings = { interval : 3000, tag : 'img' }; $.extend(settings, options); this.swap(settings); }, swap : function(options) { if ( this.find(options.tag +':visible').length > 1 ) { this.find(options.tag +':visible').not(':first').hide(); } } }); I have 3 visible images in my $('#slider') element, I am calling $('#slider').slide() from inside $(document).ready(function(){}); yet when I alert this.find(options.tag +':visible').length it alerts 0? Quote Link to comment Share on other sites More sharing options...
Andy-H Posted January 13, 2012 Author Share Posted January 13, 2012 Never mind, it was treating them as hidden for some reason, I'll find another way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.