• Resolved kslabo

    (@kadoyan80)


    <script type="text/javascript"><!--
    function tree(id) {
      if (document.getElementById(id).style.display == "block")
       document.getElementById(id).style.display="none";
      else document.getElementById(id).style.display="block";
     }
     // --></script>
    
    [su_animate type="fadeInUp"]
    [su_button url="javascript:tree('click1')" style="noise" background="#ff1493" color="#ffffff" size="5" wide="yes" center="yes" radius="round" text_shadow="0px 0px 0px #ffffff" title="1"]1[/su_button]
    
    <div id="click1" style="display:none;">

    The above code worked until 7.0.0, but after updating to 7.0.1 the link becomes invalid. Is this a bug or by design? I would appreciate it if you could tell me how to solve it.

    • This topic was modified 10 months, 2 weeks ago by kslabo.
    • This topic was modified 10 months, 2 weeks ago by kslabo.
    • This topic was modified 10 months, 2 weeks ago by kslabo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vova

    (@gn_themes)

    Hi kslabo,

    Try using the onclick attribute instead:

    [su_button onclick="tree('click1')"] ... [/su_button]

    If that won’t work, please read the following article:

    https://getshortcodes.com/docs/unsafe-features/

    Thread Starter kslabo

    (@kadoyan80)

    thank you. onclick The click1 function works, but the page you are currently viewing is immediately reloaded. I would appreciate it if you could give me some more advice.

    [su_button onclick="tree('click1')"] ... [/su_button]
    • This reply was modified 10 months, 1 week ago by kslabo.
    Thread Starter kslabo

    (@kadoyan80)

    I have corrected some expressions that were difficult to understand. onclick click1 works, but there is a symptom where it jumps to the currently displayed page after clicking. I would appreciate it if you could give me some more advice.

    [su_button onclick="tree('click1')"] ... [/su_button]

    • This reply was modified 10 months, 1 week ago by kslabo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘7.0.1 su_button url=”javascript:tree(‘click1’)” does not work’ is closed to new replies.