I can’t hide my div using some i.e. explode effect in jquery ui, It always slides down (or something like that), whatever effect I put as parameter in my code.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://jquery-ui.googlecode.com/svn/tags/1.8rc3/ui/jquery-ui.js"></script>
$(document).ready(function(){
$('.rozwin').click(function(){
$('#main').hide('explode');
$('#main').show('explode');
});
<a href="" class="rozwin>hide and show</a>
<div id='main'>...</div>
There’s quite a bit wrong with this code.
This script src is missing the
http:You do not start your javascript with a
<script type="text/javascript">, so all of your jQuery is interpreted as plain text.You are not preventing the default action of the click.
You do not enclose your
.ready()…Your anchor tag’s class has no closing quote.
Here’s the snippet with all the fixes it needs.
Keep in mind that your show events won’t work as expected because they’re triggering too quickly, since you’re not using it in the callback of
.hide().http://jsfiddle.net/zq2Hz/