jQuery_分享扩展
jQuery_分享扩展
点击显示或着隐藏更多的分享图标
function share() { var isOpen = false //标识当前的状态(初始为关闭) var $shareMore = $('#shareMore') var $parent = $shareMore.parent() var $as = $shareMore.prevAll('a:lt(2)') var $b = $shareMore.children() $shareMore.click(function () { if (isOpen){//去关闭 isOpen = false $parent.css('width',155) $as.hide() $b.removeClass('backword') } else {//去打开 isOpen = true $parent.css('width',200) $as.show() $b.addClass('backword') } }) }