The text on the video background does not appear to be showing up when the video background

I'm currently working on a WordPress theme and encountering an issue that I can't seem to resolve. I've integrated Syd Lawrence's background video plugin from https://github.com/sydlawrence/jquery.videoBG to add a video background, but the text within the same div is not displaying as intended. You can view my website at

The video div contains an h1 header and description that are failing to show up. Can anyone pinpoint where I might be making a mistake? I've attempted adjusting z-index values for the text with no success :(

Appreciate any assistance provided. Thank you! : )

The markup structure I have used is as follows -

<div id="home-video">
    <h1><span class="red">Ola,</span> im black dahlia!</h1>
    <span class="home-text">This is a....blah blah.</span>
    <p class="home-text"><a href="#work" class="button">Our Work</a></p>
    <div class="home-icon">
    <a href="#work"><i class="icon-cog icon-spin"></i></a>
    </div><br>
    </div>

In the footer section, JavaScript enclosed in the document.ready function appears like this -

var isTouch = Modernizr.touch;<br>
    if(!isTouch){jQuery('#home-video').videoBG({<br>
    mp4:'http://localhost/copperhead/wp-content/uploads/2013/10/cameraLens.mp4',<br>
    ogv:'http://localhost/copperhead/wp-content/uploads/2013/10/cameraLens.ogg',<br>
    webm:'http://localhost/copperhead/wp-content/uploads/2013/10/cameraLens.webm',<br>
    poster:'http://localhost/copperhead/wp-content/uploads/2013/10/78703.jpg',<br>
    zIndex:-30,<br>
    fullscreen: true<br>
    });<br>
    }

Answer №1

Big thanks to Mateusz for the assistance. After some thorough investigation, I discovered that the plugin is actually duplicating the div, hence the presence of two divs with the same ID. Removing the "align center" attribute proved to be the solution to my problem. Additionally, taking out the "overflow hidden" property revealed that the text was located in the middle of a 3000 pixel wide div! To those who may come across this issue in the future, it is crucial to specify a width for videoBG; otherwise, you will end up with an excessively wide element. Furthermore, setting the z-index to 0 is essential - going negative will render the text elements unclickable. I have made the necessary updates to my demo to ensure proper functionality.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are the steps to effectively utilize the static folder in Django for organizing CSS and JavaScript files?

I'm completely new to the Django framework. I managed to create a simple welcome page, but now I'm struggling to include a CSS file in my project. Whenever I try to apply the CSS file, I encounter an error saying "NetworkError: 404 NOT FOUND - / ...

Adjust the background color of the unordered list when it corresponds to the current

Looking to customize a course calendar so that the day column stands out on its designated day of the week. For example, on Wednesday, the Wednesday column should have a distinct appearance. I've been experimenting with different methods and searchi ...

Tips for interpreting Ajax class responses received from an ASP.NET MVC Controller

Hello and thank you so much for your assistance! I'm a beginner in the world of Web Programming. I am working on an Ajax call to a controller in ASP .NET MVC. After receiving the response, I am attempting to extract multiple pieces of information fro ...

Jquery Tablesorter no longer supports the StickyHeaders widget

After encountering a similar issue as described in this question, I found myself facing a problem. My table includes a stickyHeaders widget that fixes the headers while scrolling. Additionally, there are checkboxes within some of the table cells. Upon chan ...

Steps to create a dynamic Datatable using Jquery

Can someone please help me create a dynamic table using Jquery DataTables? I specifically need the table to be of type Server-side processing, where all the columns are generated in the same Ajax request along with the results. DataColumns = "" //JSON res ...

Is it necessary to have aria-checked attribute on a physical checkbox?

I've come across many instances of customized checkboxes that utilize the 'aria-checked' attribute. However, I am curious if it is necessary to include this attribute when using input type=checkbox? Will the checkbox still be accessible to s ...

The functionality of jQuery mouseenter and mouseleave events seems to be malfunctioning when applied to newly injected DOM elements

I encountered an issue with my code. It functions properly, but when I introduce new elements into the dom, it fails to show or hide them. jQuery("div.cat-icon").on({ mouseenter: function () { jQuery(this).find('.catselect').show( ...

Playing Sound Instantly in JavaScript without delay

I have successfully implemented playing sound with keys using HTML and .play. However, there is a delay as it waits for the track to finish playing before allowing me to play it again instantly upon each click. I am seeking a solution to trigger the sound ...

Struggling to customize the carousel bootstrap CSS within a CodeIgniter framework

My carousel displays images with varying heights, causing the need to adjust the image height without distorting it. Below is my code snippet: <html lang="en"> <head> <meta charset="UTF-8> <meta name="viewport" content="width=device- ...

The accuracy of Google Maps is compromised when the width is expanded

Here's a piece of code I use to adjust the size of the Google Map container: var myMap = document.getElementById('googleMap'); myMap.classList.toggle('fullscreen'); And here is the corresponding CSS: .fullscreen { width: 100% !i ...

When the screen is resized, the embedded iframe moves smoothly to the left side

I recently created a projects page, but I am facing an issue with the iframe embed. Whenever the screen is resized, it keeps shifting to the left. However, what I really want is for it to be centered instead of being on the left side: https://i.stack.imgu ...

The JavaScript canvas is showing an error stating that the image is "undefined."

I'm attempting to change the image when I press the space bar, but I keep getting an error saying "ig is not defined". I'm not sure why this is happening, any thoughts? Also, worth mentioning that I'm using Notepad, which is the free text ed ...

Exploring the depths of recursive descent parsing and the intricacies of abstract

As I dive into creating a recursive descent parser from scratch for educational purposes, I've encountered some challenges along the way. To illustrate my point, let's take a quick look at a snippet of the CSS3 grammar: simple_selector = type_s ...

Using Conditional Tags for CSS Display

I'm working on implementing Conditional Tags to toggle a CSS class on or off based on the current displayed page. However, I'm running into an issue where the code isn't executing properly. There might be a syntax or logic error causing the ...

Shuffle elements on a page with random CSS class flips using JavaScript

I've implemented a feature on my page where squares can be clicked to flip over like a card, revealing their back side. Take a look at the interactive demonstration on JS Fiddle: http://jsfiddle.net/d1botfu2/ While this works well, I'd also lik ...

Use CSS to style elements that do not coincide with the specified data attribute

I'm currently working on developing a filter system. The goal is that when a user clicks on a button, the ID of that specific button will be captured and then display:none; will be applied to all elements that do not have a matching data attribute pr ...

Activate the search feature in select2 to allow multiple selections

I'm looking for a way to incorporate a search box into my multi-select fields using select2. Oddly enough, while the search boxes show up as expected in single-select fields, applying the same select2() function to a multi-select field doesn't s ...

How to position the navigation bar to the right using bootstrap

I have been experimenting with moving the navigation bar to the right side of the screen in bootstrap4 by using float: right; on the nav a element, but it doesn't seem to be having any effect. I am developing my project using a codepen app. Here is t ...

Using PHP While Loop together with jQuery

I've implemented a while loop that randomly selects images from my server and displays them. I now want to incorporate some jQuery code that allows me to click on an image and trigger the slideUp() function in jQuery. However, I'm encountering an ...

Extracting data from DataTables rows: A guide

I am trying to retrieve values of a row in DataTables when I click on the corresponding button, but I keep getting undefined results. Here is how the buttons are added: function getData() { $pdrs = Pdrs::select('ID_Piece', 'Designa ...