jQuery Slide Bug / Fix

In IE the jquery slide effect does not work so well. So I tried to make a fix (but using the jquery ui effects). I rewrote the slideUp, slideDown and slideToggle (and all of them work like a charm in all browsers):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$.fn.slideToggle = function (_speed,_function) {
	$(this).toggle('slide',{direction:'up'},_speed,_function);
}
$.fn.slideUp = function (_speed,_function) {
	if (!$(this).is(':hidden')) {
		$(this).hide('slide',{direction:'up'},_speed,_function);
	} else {
		if (_function)
			_function.call();
	}
}
$.fn.slideDown = function (_speed,_function) {
	if ($(this).is(':hidden')) {
		$(this).show('slide',{direction:'up'},_speed,_function);
	} else {
		if (_function)
			_function.call();
	}
}


 
 
 
Leave a comment
* Required.
* Required. Not published.
If you have one.

 

What we do

We do web programming and we do it at its best:
  • Websites based on MVC platform
  • Wordpress plugins and templates
  • Drupal modules and themes

Facebook for Business Purposes

 

Facebook has long ended in being just a social networking website and nobody could have predicted that it will be used as a powerful marketing tool. The fact that boosted the evolution of this socializing platform into such a powerful instrument is that nowadays it is available on any device that has a basic modern [...]