Jump to content

Why isn't this working?


Andy-H

Recommended Posts


$.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?

Link to comment
https://forums.phpfreaks.com/topic/254934-why-isnt-this-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.