Hello list. I'm using the script from this page "http://gueschla.com/
labs/smoothbox/" and I have a question, but i can't post in that site.
Maybe somebody in this group already solve the same question.
In the code I have this in the first lines:
------------------------code----------------------
function TB_init(){
$$("a.smoothbox").each(function(el){
el.onclick = TB_bind <------------------------------------
TAKE CARE OF THIS LINE
});
}
function TB_bind(event){
var event = new Event(event);
// stop default behaviour
event.preventDefault();
// remove click border
this.blur();
// get caption: either title or name attribute
var caption = this.title || this.name || "";
// get rel attribute for image groups
var group = this.rel || false;
// display the box for the elements href
TB_show(caption, this.href, group);
this.onclick = TB_bind; <------------------------------------TAKE
CARE OF THIS LINE
return false;
}
-----------------------------------------------------
Why in the domready I have
"el.onclick = TB_bind"
and in the function TB_bind i have
"this.onclick = TB_bind;"
???
"this.onclick = TB_bind;", with this instruction All works find the
first time, but when I do a second click over an "a.smoothbox" the
popup is displayed in two occasions, and this generate some problem in
my custom version.
I want to delete this line, but I worry. This line have another
function?
thanks for read and sorry for my poor english.