<script>
function amIclicked(e, element)
{
e = e || event;
var target = e.target || e.srcElement;
if(target.id==element.id)
return true;
else
return false;
}
function oneClick(event, element,url)
{
if(amIclicked(event, element))
{
window.location = url;
}
}
</script>
<div class="row divlink" id="divv" οnclick="oneClick(event, this,'http://www.google.com')">
I am a Div
<a href="http://baidu.com">baidu</a>
</div>
function amIclicked(e, element)
{
e = e || event;
var target = e.target || e.srcElement;
if(target.id==element.id)
return true;
else
return false;
}
function oneClick(event, element,url)
{
if(amIclicked(event, element))
{
window.location = url;
}
}
</script>
<div class="row divlink" id="divv" οnclick="oneClick(event, this,'http://www.google.com')">
I am a Div
<a href="http://baidu.com">baidu</a>
</div>