Enabling JS to be published in a post is a bad idea. Its security hole that people will take advantage of if they know its possible. That aside if you know how to register/enqueue a script in WP you could accomplish what you want with a few lines of jQuery targeting a certain class or ID you can add into the post. Not sure if that is what you are talking about. Thinking about it it seems like what you are taking about should be put into your theme and not in a post but thats me thinking aloud.