I want to hide some things from Google such as sign up, log in and similar “links”. They are not reall links but element ids. When user clicks to the element, it calls js functions and jquery pop up shows.
Simple question: Is any chance that Google will go through the following function or will be hidden for sure?
<div id="logIn" style="cursor:pointer;">Log in</div>
<script type="text/javascript" src="/js/login.js"></script>
<script>
$(document).ready(function(){
$('#logIn').click(function() {
//function display pop up comes here
});
});
</script>
First, why do you want to hide the ‘login’ function from Google? It won’t be able to log in, but it doesn’t matter if it sees that you have a login function.
Second, why are you going to arbitrarily lock out people who don’t have Javascript running?
Google reads all code, if you think its hidden or not.
If you want to hide this from google, I would create a external javascript file that executes as PHP.
This PHP document will display one javascript code to users and another to google.
In any case, conning google is never a good idea and their obviosly not stupid and could get you in trouble.
It’s highly unlikely, from that code it looks like the login is triggered through an anchor fragment and Google don’t punish people for those, so you’ll be fine.
PS: You’re not technically hiding anything, the content is on the page, it’s just being hidden from view until it’s needed.
The thing is I want to show a whole process in jquery pop up. This means:
User clicks to product
When he clicks on it, in pop up some extra info shows.
If he clicks to buy it, in this same page inside jquery pop up log in form shows.
From here he can clicks log in with Facebook
It is not actually pop up but jquery creates with css square and puts it above the content. Like in yellowpages.com if you click Register or Log in.
And this code will be in almost every page in rightbar. And here I am worried what will happen if Google will think I am hidding some things if I put this dialogs with jquery above the content.