Skip to content

Instantly share code, notes, and snippets.

@millken
Created August 31, 2010 05:22
Show Gist options
  • Save millken/558593 to your computer and use it in GitHub Desktop.
Save millken/558593 to your computer and use it in GitHub Desktop.
jQuery(function () {
if (!(typeof isStating == "undefined" || !isStating)) {
var a = $("#hd .header").eq(0).offset().left;
$(window).resize(function () {
a = $("#hd .header").eq(0).offset().left
});
$(document).mousedown(function (c) {
var d = {};
d.r = encodeURIComponent(window.location.href);
c = c || window.event;
var f, b, e = c.target || c.srcElement;
if (e && 3 == e.nodeType) e = e.parentNode;
if (e && e.tagName) {
b = e.tagName.toLowerCase();
if (b == "img") f = e.src;
else if (b == "a") f = e.href;
if (f) d.u = encodeURIComponent(f);
if (b) d.t = b;
d.x = c.pageX - a;
d.y = c.pageY;
(new Image).src = "http://click.nuomi.com/tj?" + $.param(d) + "&s=" + Math.random()
}
})
}
});
@millken
Copy link
Author

millken commented Aug 31, 2010

统计热点区域

@millken
Copy link
Author

millken commented Sep 9, 2010

function addListener(element,e,fn){ element.addEventListener?element.addEventListener(e,fn,false):element.attachEvent("on" + e,fn)}

@millken
Copy link
Author

millken commented Oct 14, 2010

$('input[name=experience]:checked').val()
获取单选

@millken
Copy link
Author

millken commented Oct 20, 2010

地址栏运行JS函数 javascript:(function(){document.getElementById("KeyWord").value="xx333xx"})();

@millken
Copy link
Author

millken commented Jan 14, 2011

$("#headerMailInput").click(function(){
    $(this).val("");
}).blur(function(){
    var self = $(this);
    var email = self.val();
    if (email ==''){
        self.val("输入Email,订阅每日团购信息");
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment