Text 1
NO.1
A:Mom, I 'm feeling terrible now.
B:Let me see~~~Oh,you have a fever,let's go to see a doctor at once.
Question:where are thy going?
NO.2
A:Hello!LiYing,what's the date today?
$.fn.smartFloat = function() {
var position = function(element) {
var top = element.position().top, pos = element.css("position");
$(window).scroll(function() {
var scrolls = $(this).scrollTop();
if (scrolls > top) {
if (window.XMLHttpRequest) {
element.css({
position: "fixed",
top: 0
});
} else {
element.css({
top: scrolls
});
}
}else {
element.css({
position: "relative",
});
}
});
};
return $(this).each(function() {
position($(this));
});
};
//绑定
$("#container").smartFloat();