• Resolved evilhidden

    (@evilhidden)


    Hi,

    I’m trying to add a button with an onClick event. Here is what I’m trying to add _gaq.push(['_trackEvent','Download','PDF',this.href]);

    As soon as that goes in the button breaks. It starts thinking that the last few characters are part of the text of the button itself. I’ve tried every variation I can think of – with quotes, without quotes, no semicolon, etc.

    I started stripping off characters at the end one-by-one. When the closing bracket “]” is removed, the button works; however, that renders the js inoperable.

    It also looks like the actual rendered page is very odd. It’s taking the last characters of the onClick and adding them to another line and removing others all together. It also makes the actual link fail. It’s adding the entire URL before the full link.

    Am I doing something wrong here? Any options to fix?

    https://ww.wp.xz.cn/plugins/shortcodes-ultimate/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘onClick breaks shortcode when adding ]’ is closed to new replies.