If a div has a onclick event but you do not want onclick event happen when you use mouse to select some text
onmousedown="mousedownInContacts();" onmousemove="mousemoveInContacts();" onmouseup="mouseupInContacts(this);"
var ifMousedown=false;
var ifMousemove=false;
function mousedownInContacts(){
ifMousedown=true;
}
function mousemoveInContacts(){
if(ifMousedown){
ifMousemove=true;
}
}
function mouseupInContacts(e){
if(!ifMousemove){
childrenToggle(e);//this is what onclick event want to do
}
ifMousemove=false;
ifMousedown=false;
}
1 JQuery issue
When ajax load the html page with javascript it will execute the javascript and then put it into random access memory. then javascript code will not execute when we called it in the html page.
Thanks my leader Frank's guid