test20130121
Ich bin dynamisch™, doubleclick please
Evaluation1: | ||
Evaluation2: | ||
Evaluation3: |
test20130619
This is to test :
- Click function on parent, and clicking on child does not fire on parent element.
- What does a form tag do. (return true-->page "reloaded"; return false-->page not reloaded)
asdfaskdfkjs?
test20130720
test20130823
Before printing timetimetime.net pages, please type:
Then resize the window to adapt your wanted size.
jQuery('.rightnews').fadeOut();
jQuery('#cproIframe1').parent().fadeOut();
jQuery('.post_nav').fadeOut();
jQuery('iframe').fadeOut();
Then resize the window to adapt your wanted size.
test20130916
1. Click on an element ELM as if clicking on ELM's a-tag node
2. Adapt width for select, due to IE<=8's incompatibility.
jQuery('.offerContent.teaser:not(.noClick)').click(function(ev){
if ((ev.target != jQuery(this).find('a:eq(0)').get(0)) && (ev.target.parentNode != jQuery(this).find('a').get(0))) {
var href=jQuery(this).find('a').attr('href');
var target=jQuery(this).find('a').attr('target');
if(target=="_blank"){
window.open(href);
}else{
self.location.href=href;
}
}
});
the whole condition might be replaced by:
function parentsContainATag(jsObj){//return boolean
/*
if (jsObj.tagName = "BODY") {
return false;
} else {
if (jsObj.tagName = "a") {
return true;
} else {
parentsContainATag(jsObj.parentNode);
}
}
*/
return (jQuery(jsObj).closest('a').length == 1);
}
function on #mySelect
function autoAdaptSelect(selectName, optimalWidth, time){
var defaultWidth=jQuery('select[name='+selectName+']').css('width');
var ieSpecialClickEnabled=false;
jQuery('select[name='+selectName+']').on({
focus: function(){
jQuery(this).addClass('focus');
jQuery(this).stop().animate({'width':optimalWidth+'px'},time);
},
mouseenter: function(){
jQuery(this).stop().animate({'width':optimalWidth+'px'},time);
},
mouseleave: function(){
if ((/MSIE (\d+\.\d+);/.test(navigator.userAgent) && !jQuery(this).hasClass('focus')) || !/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
jQuery(this).stop().animate({'width':defaultWidth},time);
}
},
click: function(){
if (ieSpecialClickEnabled) {
jQuery(this).trigger('blur');
} else {
if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)) ieSpecialClickEnabled = true;
}
},
change: function(){
if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
jQuery(this).stop().animate({'width':defaultWidth},time);
jQuery(this).removeClass('focus');
}
},
blur: function(){
jQuery(this).stop().animate({'width':defaultWidth},time);
jQuery(this).removeClass('focus');
if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
ieSpecialClickEnabled = false;
}
}
});
};
test20140122
isOnScreen function:
function isOnScreen(jQElmt){
var curTop = jQElmt.offset().top;
var page_y_offset = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
var screenHeight = page_y_offset + jQuery(window).height();
return (curTop > screenHeight) ? false : true;
}