[jQuery] Selector not working ?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,
I am confronted to a problem that remains totally mysterious to me. I
have some selectors that do not seem to work.
I am using jQuery for the website of my company that is built upon
Drupal. I also use the Curvy Corners and the Drop Shadow plugins.
Everything is working fine on this module.
On my front page, I am using jQuery to make something quite simple:
when the user moves its cursor on a special div, I display a related
text in another part of the page. And if the user clicks on the div, I
move him to another page. I had this little script work and it did
exactly what I wanted to do. But for an unknown reason it stopped to
work. Nothing happens when the user moves its cursor or click on the
div. I am using classical selectors and mouseover() and click()
functions.
I wondered whether this was not due to a bad syntax in a script above
but I could not find anything like this. I tried to remove all the code
linked to Curvy Corners as the problem appeared some time after I
manipulated it, but it did not change anything. I also tried to disable
Google Analytics and my jQuery plugins, but it did not solve the
problem either.
The weirdest thing is that the code enabling the curvy corners, which
uses jQuery and selectors, is working, but not the jQuery code that is
a few lines below. The problem occurs as well on Firefox and Internet
Explorer.
I am sure that I am missing something but I cannot see what. Firebug
does not shows any errors.
You can see the incriminated code on <a class="moz-txt-link-freetext"
href="http://www.net-vitesse.com">http://www.net-vitesse.com</a> on
lines 156 to 173 (I do not intend any advertisement here, I just try to
solve my problem. Tell me if this is a problem to put my URL here). I
copy the extract here :
<span class="sourceRowText"><script>
$(".welcome-picture").mouseover(function(){
$(".welcome-desc").hide();
$("#" + this.id + "-desc").show();
});
$("#welcome-sip").click(function() {
window.location = <a class="moz-txt-link-rfc2396E"
href="http://www.net-vitesse.com/content/mclink">"http://www.net-vitesse.com/content/mclink"</a>;
});
$("#welcome-services").click(function() {
window.location = <a class="moz-txt-link-rfc2396E"
href="http://www.net-vitesse.com/content/services">"http://www.net-vitesse.com/content/services"</a>;
});
$("#welcome-soa").click(function() {
window.location = <a class="moz-txt-link-rfc2396E"
href="http://www.net-vitesse.com/content/product">"http://www.net-vitesse.com/content/product"</a>;
});
</script>
Can you see anything that I am missing ?
On my side I will try to find a Voodoo dance to make code work I have
no more ideas :o(
Thanks,
Antoine Roux
</span>
<i><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(166, 166, 166);"></span></i>
</body>
</html>