jonybigude
02-09-2012, 03:49 PM
Hello!!
I decided I wanted to have this effect on my image gallery:
http://www.webinventif.fr/wp-content/uploads/projets/tooltip/02/
So, I was following this tutorial:
http://www.catswhocode.com/blog/how-to-create-a-fancy-image-gallery-with-jquery
My issue is that the tutorial is not really clear and apparently it has errors. My editing software says that there is a syntax error in
$("a.screenshot").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "
" + this.t : "";
$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
My editing program says that the error is in:
My editing program says that the error is in: var c = (this.t != "") ? "
Another issue that is killing me is that in the tutorial the author says that: "Once you inclued the gallery functions, you have to activate it. Like for the functions, you can embed it on your html page or put it in a separate .js file." - How do I activate it?? Is there an option on the software that I use to do it, like there is for attaching CSS files? Should I just save a separate .js file with the supplied code and the activation is done automatically??
This is it for now, hope somebody can actually help me out :)
Thanks in advance!
I decided I wanted to have this effect on my image gallery:
http://www.webinventif.fr/wp-content/uploads/projets/tooltip/02/
So, I was following this tutorial:
http://www.catswhocode.com/blog/how-to-create-a-fancy-image-gallery-with-jquery
My issue is that the tutorial is not really clear and apparently it has errors. My editing software says that there is a syntax error in
$("a.screenshot").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "
" + this.t : "";
$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
My editing program says that the error is in:
My editing program says that the error is in: var c = (this.t != "") ? "
Another issue that is killing me is that in the tutorial the author says that: "Once you inclued the gallery functions, you have to activate it. Like for the functions, you can embed it on your html page or put it in a separate .js file." - How do I activate it?? Is there an option on the software that I use to do it, like there is for attaching CSS files? Should I just save a separate .js file with the supplied code and the activation is done automatically??
This is it for now, hope somebody can actually help me out :)
Thanks in advance!