Title: Custom Variable within JavaScript?
Last modified: July 4, 2019

---

# Custom Variable within JavaScript?

 *  Resolved [anuwebdesign](https://wordpress.org/support/users/anuwebdesign/)
 * (@anuwebdesign)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-variable-within-javascript/)
 * Is it not possible to use the custom variables within JS? If you could make that
   possible, this plugin would be super duper awesome…

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

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/custom-variable-within-javascript/#post-11705928)
 * Hi [@anuwebdesign](https://wordpress.org/support/users/anuwebdesign/),
 * You can place custom parameters wihtin your JS code and it will be replaced with
   the whatever value you are passing while using the shortcode.
 * Example:
 *     ```
       <script>
       console.log('%%hello%%');
       </script>
   
       [sc name="test" hello="this will be logged"]
       ```
   
 * The `%%hello%%` will be replaced with “this will be logged”.
 * This feature is already there and let me know if this is not you are expecting.
 * Thanks,
    Aakash
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-variable-within-javascript/#post-11868534)
 * Closing this as there is no update.

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

The topic ‘Custom Variable within JavaScript?’ is closed to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/custom-variable-within-javascript/#post-11868534)
 * Status: resolved