So I originally had this function-
$(".carImageClass").each( (elem,value)->
imgSrc = $(value).attr("src")
$(value).qtip({
content: {
text: "<img src=" + imgSrc + ">",
},
position:{
corner:{
target:'bottomMiddle',
tooltip:'topLeft'
}
}
})
)
Which worked, as it displayed the img that I had. However, when I made the function like this, the qtip no longer appears.
$(".result").each( (elem,value)->
imgResultDiv = $(value).find(".result-img")
img = $(imgResultDiv).find("img")
imgSrc = $(img).attr("src")
console.log(value)
console.log(imgSrc)
$(value).qtip({
content: {
text: "<img src=" + imgSrc + ">",
},
position:{
corner:{
target:'bottomMiddle',
tooltip:'topLeft'
}
}
I can prove that imgSrc is correct, and that value is what I think it is (an element of class “result”), so I’m not sure why the qtip does not appear.
Is there some sort of syntax issue? What’s going on?
did you paste the entire code?
your paste was missing a few parentheses and a brace