Title: 7.0.1 su_button url=&#8221;javascript:tree(&#8216;click1&#8217;)&#8221; does not work
Last modified: January 14, 2024

---

# 7.0.1 su_button url=”javascript:tree(‘click1’)” does not work

 *  Resolved [kslabo](https://wordpress.org/support/users/kadoyan80/)
 * (@kadoyan80)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/7-0-1-su_button-urljavascripttreeclick1-does-not-work/)
 *     ```wp-block-code
       <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 2 years, 4 months ago by [kslabo](https://wordpress.org/support/users/kadoyan80/).
    -  This topic was modified 2 years, 4 months ago by [kslabo](https://wordpress.org/support/users/kadoyan80/).
    -  This topic was modified 2 years, 4 months ago by [kslabo](https://wordpress.org/support/users/kadoyan80/).

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

 *  Plugin Author [Vova](https://wordpress.org/support/users/gn_themes/)
 * (@gn_themes)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/7-0-1-su_button-urljavascripttreeclick1-does-not-work/#post-17369864)
 * Hi kslabo,
 * Try using the `onclick` attribute instead:
 *     ```wp-block-code
       [su_button onclick="tree('click1')"] ... [/su_button]
       ```
   
 * If that won’t work, please read the following article:
 * [https://getshortcodes.com/docs/unsafe-features/](https://getshortcodes.com/docs/unsafe-features/)
 *  Thread Starter [kslabo](https://wordpress.org/support/users/kadoyan80/)
 * (@kadoyan80)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/7-0-1-su_button-urljavascripttreeclick1-does-not-work/#post-17370544)
 * 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.
 *     ```wp-block-code
       [su_button onclick="tree('click1')"] ... [/su_button]
       ```
   
    -  This reply was modified 2 years, 4 months ago by [kslabo](https://wordpress.org/support/users/kadoyan80/).
 *  Thread Starter [kslabo](https://wordpress.org/support/users/kadoyan80/)
 * (@kadoyan80)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/7-0-1-su_button-urljavascripttreeclick1-does-not-work/#post-17372691)
 * 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 2 years, 4 months ago by [kslabo](https://wordpress.org/support/users/kadoyan80/).

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.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [kslabo](https://wordpress.org/support/users/kadoyan80/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/7-0-1-su_button-urljavascripttreeclick1-does-not-work/#post-17372691)
 * Status: resolved