Varvara Jones Varvara Jones - 1 year ago 100
Javascript Question

Stop jQuery toggle from sliding content in

I am using a simple jQuery .toggle hoping it would show/hide my content on click. It does that but my content always slides in from left to right until it's where it should be. I don't want it to slide in. Is there a better jQuery method for this or a property I need to specify?

Thanks! This is the jQuery code I'm using:

$('.img-lg').click(function () {

Answer Source

Change $('.content').toggle("slow") to $('.content').toggle(). This will remove the transition

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download