// JavaScript Document jQuery(function () { // 分享 var timer = null; jQuery(document).on('mouseover', '.share .bds_more,.share .bdshare_popup_box,.part17_icon3', function () { clearTimeout(timer); jQuery('.bdshare_popup_box').fadeIn(); }) jQuery(document).on('mouseout', '.share .bds_more,.share .bdshare_popup_box,.part17_icon3', function () { timer = setTimeout(function () { jQuery('.bdshare_popup_box').fadeOut(); }, 500); }) jQuery(document).on('click', '.share .popup_more', function () { jQuery('.bdshare_popup_box').hide(); jQuery('.bdshare_dialog_box').fadeIn(); }) jQuery(document).on('click', '.share .bds_more', function () { $(this).attr('href','javascript:void(0)'); }) jQuery(document).on('click', '.bdshare_dialog_close', function () { jQuery('.bdshare_dialog_box').hide(); }) // QQ空间 jQuery(document).on("click", ".bds_qzone,.popup_qzone", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 新浪微博 jQuery(document).on("click", ".bds_tsina,.popup_tsina", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://service.weibo.com/share/share.php?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 腾讯微博 jQuery(document).on("click", ".bds_tqq,.popup_tqq", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://share.v.t.qq.com/index.php?c=share&a=index&title=" + encodeURIComponent(title) + "&url=" + encodeURIComponent(url) + "" window.open(op); }) // 人人网 jQuery(document).on("click", ".bds_renren,.popup_renren", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://widget.renren.com/dialog/share?resourceUrl=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=" window.open(op); }) // 微信 jQuery(document).on("click", ".bds_weixin2", function () { var url = ''; url = 'http://qr.liantu.com/api.php?text=' + window.location.href; console.log(window.location.href); var title = ""; title += "
"; title += "x"; title += "

分享到微信朋友圈

"; title += "
"; title += "

打开微信,点击底部的“发现”,使用 “扫一扫” 即可将网页分享到我的朋友圈。

"; title += "
"; jQuery("body").remove(".weixin"); jQuery("body").append(title); jQuery('.bdshare_popup_box').hide(); jQuery('.bdshare_dialog_box').hide(); }) jQuery(document).on("click", ".weixin .c", function () { jQuery(".weixin").remove(); }) // 腾讯朋友 jQuery(document).on("click", ".bds_tqf,.popup_tqf", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?to=pengyou&url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=" window.open(op); }) // QQ jQuery(document).on("click", ".bds_qq", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=&site=hongru" window.open(op); }) // 百度贴吧 jQuery(document).on("click", ".bds_tieba,.popup_tieba", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://tieba.baidu.com/f/commit/share/openShareApi?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 豆瓣网 jQuery(document).on("click", ".bds_douban,.popup_douban", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://www.douban.com/share/service?href=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 搜狐微博 jQuery(document).on("click", ".bds_tsohu,.popup_tsohu", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://t.sohu.com/third/post.jsp?url" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 分享到Facebook jQuery(document).on("click", ".bds_fbook,.popup_fbook", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://www.facebook.com/share.php?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=&site=hongru" window.open(op); }) // 分享到Twitter jQuery(document).on("click", ".bds_twi,.popup_twi", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://twitter.com/intent/tweet?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=&site=hongru" window.open(op); }) // 分享到linkedin jQuery(document).on("click", ".bds_linkedin,.popup_linkedin", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "https://www.linkedin.com/uas/login?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "&desc=&summary=&site=hongru" window.open(op); }) // QQ好友 jQuery(document).on("click", ".bds_sqq,.popup_sqq", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 百度个人中心 jQuery(document).on("click", ".bds_ibaidu,.popup_ibaidu", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://i.baidu.com/store/?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 美丽说 jQuery(document).on("click", ".bds_meilishuo,.popup_meilishuo", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://www.meilishuo.com/meilishuo_share?siteurl==" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 蘑菇街 jQuery(document).on("click", ".bds_mogujie,.popup_mogujie", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://www.mogujie.com/mshare?==" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 花瓣 jQuery(document).on("click", ".bds_huaban,.popup_huaban", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://huaban.com/bookmarklet/?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) // 飞信 jQuery(document).on("click", ".bds_fx,.popup_fx", function () { var url = window.location.href; var img = jQuery(this).data("img"); var title = jQuery(this).data("tit"); if(title=="标题" || title=="标题1"){ title=jQuery(".details > h4").text(); } var op = "http://i.feixin.10086.cn/apps/share/share?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(title) + "" window.open(op); }) })