Title: curiousco's Replies | WordPress.org

---

# curiousco

  [  ](https://wordpress.org/support/users/curiousco/)

 *   [Profile](https://wordpress.org/support/users/curiousco/)
 *   [Topics Started](https://wordpress.org/support/users/curiousco/topics/)
 *   [Replies Created](https://wordpress.org/support/users/curiousco/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/curiousco/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/curiousco/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/curiousco/engagements/)
 *   [Favorites](https://wordpress.org/support/users/curiousco/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Video Background] Video ID?](https://wordpress.org/support/topic/video-id-1/)
 *  Thread Starter [curiousco](https://wordpress.org/support/users/curiousco/)
 * (@curiousco)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/video-id-1/#post-7475506)
 * Wow, I would have _never_ come up with that. Thank you so much — it works like
   a dream. I’ll share my creation once it’s finished. 🙂
 * I’m immensely grateful!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Video Background] Video ID?](https://wordpress.org/support/topic/video-id-1/)
 *  Thread Starter [curiousco](https://wordpress.org/support/users/curiousco/)
 * (@curiousco)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/video-id-1/#post-7475490)
 * Sure –
 * I’m using the videos in combination with a jQuery script called onePageScroll,
   which essentially mimics Apple’s old iPhone website. (see: [http://www.thepetedesign.com/demos/onepage_scroll_demo.html](http://www.thepetedesign.com/demos/onepage_scroll_demo.html))
 * Most of the main content sections within an individual HTML page will have a 
   video background. When scrolling from one content section to the next, I need
   to be able to pause the current section’s video and play the new section’s video.
   The onePageScroll API allows for all kinds of callbacks, so the ability to do
   what I’m trying to accomplish is built into the jQuery script.
 * The problem I’m having is that I don’t know how to target specific videos without
   them having a unique ID. For example, the first instance of the video I’m using
   was placed into a container called “.sectionHeader” — now I want to use JS to
   pause or play this particular video.
 * Currently, i’m trying to reference it via document.getElementById(“.sectionHeader”)
 * To boil things down, say I have three videos, each placed into containers “.sectionOne”,“.
   sectionTwo”, and “.sectionThree” respectively. How could I use JavaScript to 
   pause one video and play another?
 * Thanks again for your time, it’s very much appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Video Background] Video ID?](https://wordpress.org/support/topic/video-id-1/)
 *  Thread Starter [curiousco](https://wordpress.org/support/users/curiousco/)
 * (@curiousco)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/video-id-1/#post-7475483)
 * Thanks for the quick reply! I’m quite a JS novice/hack, so surprised I’ve gotten
   as far along as I have. A testament to your work, me thinks. 🙂
 * That being said, any advice on how to go about adding an ID var/parameter to 
   the existing JS that I can later reference?
 * Thanks again,
    Gabe

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