开发者

Call function from hyperlink defined in qTip content

开发者 https://www.devze.com 2023-01-01 17:25 出处:网络
I am trying to c开发者_Go百科all a javascript function from a hyperlink that is part of the content in a qTip. I keep getting the error my function is not defined but it is defined within the page and

I am trying to c开发者_Go百科all a javascript function from a hyperlink that is part of the content in a qTip. I keep getting the error my function is not defined but it is defined within the page and can be called outside of qTip. Below is what I have so far:

    function addCalendarToolTip(objTarget, objEvent) {
        $(objTarget).qtip({
            content: '<a href="#" onClick="tester();">mylink</a>' });

function tester() { alert("hello world"); }

If I put the alert within the onClick attribute, I at least get the alert to work. Is there some special way of calling a function from within qTip? Any help is appreciated. Thanks.


It is working for me now. Not sure what I was doing wrong to begin with :P

0

精彩评论

暂无评论...
验证码 换一张
取 消