Title: javascript in WP
Last modified: August 30, 2016

---

# javascript in WP

 *  Resolved [edwardsmarkf](https://wordpress.org/support/users/edwardsmarkf/)
 * (@edwardsmarkf)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/)
 * hello –
 * i suspect this topic has been beat to death, but since the search terms are so
   common its not easy to find.
 * when i insert JScript into WP, i switch the editor from “Visual” to “Text” and
   code away, no problem.
 * however, when i switch back to “Visual” all my line-breaks, etc, all the pretty
   stuff has disappeared and my jScript is now merged into one line. (not sure quite
   what happens to double-slash in-line comments “//”
 * so, what is the EASIEST way to include jScript in a page and not loose my line-
   break readability? this only needs to go into just one page.
 * i see there is a jScript “insert” option, but i figure since its only one page,
   i would rather keep it there if possible (and its easier)
 * is there a recommended plug-in that has jScript insertion?

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/#post-6893766)
 * see if any of these plugins will work for you: [https://wordpress.org/plugins/search.php?type=term&q=javaScript+insertion](https://wordpress.org/plugins/search.php?type=term&q=javaScript+insertion)
 * Also have read of this codex: [https://codex.wordpress.org/Using_Javascript](https://codex.wordpress.org/Using_Javascript)
 *  Thread Starter [edwardsmarkf](https://wordpress.org/support/users/edwardsmarkf/)
 * (@edwardsmarkf)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/#post-6893858)
 * ok [Ad-inserter](https://wordpress.org/plugins/ad-inserter/screenshots/) wins
   the day. i tried a couple of others but they dont seem to work with our extra
   plugins.
 * thanks.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/#post-6893860)
 * glad to know it 🙂
 *  Thread Starter [edwardsmarkf](https://wordpress.org/support/users/edwardsmarkf/)
 * (@edwardsmarkf)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/#post-6893869)
 * one would think there would be a way to toggle back and forth between “Visual”
   and “text” and not loose jScript line-breaks!

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

The topic ‘javascript in WP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [edwardsmarkf](https://wordpress.org/support/users/edwardsmarkf/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/javascript-in-wp/#post-6893869)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
