Problems with prorotype (JavaScript)
#11
Actually, I've kind of almost figured this out. Kind of. I now have the event getting stopped and everything, I just need to make the effect work Smile

Event.observe(window, 'load', function() {
	Event.observe('unreadAlerts_menu', 'click', function(e) {
		Event.stop(e);

		var popup_id = e.target.identify() + '_popup';
		Effect.toggle(popup_id, 'blind');
	});
});
Reply
#12
Just checked the console and I'm seeing this:

Quote:ReferenceError: Effect is not defined

Does that mean that MyBB doesn't come with scriptaculous as I believed it did?
Reply
#13
effects.js should be in the mybb package; I added it to headerinclude as I think it was not referred to anywhere.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#14
Yeah, it is in the package but isn't included. EIther way, I now have it running fine Big Grin To use it all it takes is an edit to headerinclude to remove the jquery scripts and add this:

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/myalerts.prototype.js"></script>
Reply
#15
EXCELLENT. I just so happen to have that in my headerinclude already Toungue
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#16
Nice one Smile If you happen to take a look at my most recent commit on github you should have a sexy dropdown now Toungue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)