d
Amit DhamuSoftware Engineer
 

Smooth Slide Toggle

1 minute read 00000 views
function toggleExpand(list) {
  var element = 'div#' + list

  jQuery.fn.slideFadeToggle = function (speed, easing, callback) {
    return this.animate(
      { opacity: 'toggle', height: 'toggle' },
      speed,
      easing,
      callback
    )
  }

  jQuery(element).slideFadeToggle('fast')
}