Hi,

JQuery Not working in Drupal, Please help me fixing it. The below is my JQuery code.

$(document).ready(function(){
		$('#slides').cycle({ 
		fx:     'fade', 
		speed:  '300', 
		timeout: 6000, 
    	       delay:  -2000,
		next:   '#next', 
		prev:   '#prev'

	});
	
function onBefore() {$('#title').html(this.title);}
});

Regards

The jQuery questions should be made on JavaScript / DHTML / AJAX forum.

From Drupal perspective, some jQuery plugins could not work with the jQuery bundle included on Drupal core (the jQuery distribution included maybe is too old). To fix this issue, there is a module to update the jQuery distribution: http://drupal.org/project/jquery_update

Looking at your code, use comments into OnBefore() line to test the cycle plugin alone. title isn't a defined object. Try to use a jQuery selector instead.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.