I Think that the problem is here: $(data-tooltip!="")
instead of $('[data-tooltip!=""]')
.
An other problem is your call is before the tag img so use InlineScript
ìnstead of headscript
To Finish, I think should precise de name of the tag (img
) in the selector.
Try to replace
$this->headscript()->appendScript('$(data-tooltip!="").qtip({content: {attr: \'data-tooltip\'}});');
By
$this->InlineScript()->appendScript('$(\'img[data-tooltip!=""]\').qtip({content: {attr: \'data-tooltip\'}});');