Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

LoginWidget's JS conflicting with jQuery


Go to End


2 Posts   2094 Views

Avatar
BrysaniStudios

Community Member, 12 Posts

22 April 2010 at 5:56am

I'm in the process of building a site right now using silverstripe. I used a little jQuery to change some CSS on the page and I plan on building a gallery in jQuery as well. But after I implemented the LoginWiget, i noticed it added a bunch of ProtoType JS to the page and my jQuery is no longer working. So I'm guessing that they are conflicting and aren't working to well with eachother. Anyone have some ideas how to get the to work together, or does this mean I have to write the rest of my JS in Prototype. I'd rather work with jQuery because I'm more familiar with it and I need to stay on schedule with this site, so I don't have too much time to learn another Javascript library.

Any Ideas?
Thanks,
Bryant

Avatar
BrysaniStudios

Community Member, 12 Posts

22 April 2010 at 6:10am

Edited: 22/04/2010 6:11am

Nevermind I figured it out! :-) I just wrapped a jQuery function around it

Before

$("#nav li:last-child").css('border', 'none');

After

(function($) {

	$("#nav li:last-child").css('border', 'none');

})(jQuery);