Removing element from DOM with jquery through plugin Custom Scripts for Customizer

Question

This is my first post. I have the plugin powerpress loading an external image from an unsecure source that causes mixed elements so the page is not fully secured and I get the message “not fully secure”. The plugin offers a great shortcode where you can add a default image but is not working with the latest version. This is the image I want to remove from the DOM, hopìng I will get a full secure page.

<div class="wp-playlist-current-item">
    <img src="">
<div/>

I have followed the theme instructions and installed the plugin Custom Scripts for Customizer.
I have used this code that removes the image from chrome’s console but not from the live page.

jQuery(document).ready(function($) {
$('.wp-playlist-current-item img').remove();
});

The code is not throwing any errors but is not working. I have tried no conflict Jquery and putting the code in both header and footer.

This is how the code is printed:

<script type="text/javascript">
    /* <![CDATA[ */
        jQuery(document).ready(function($) {
        $('.wp-playlist-current-item img').remove();});
    /* ]]> */
</script>

Hope someone can enlighten my ignorance! Thanks in advance to any such delighful creature…

0
, , kickdrummer 2 years 2020-09-01T16:11:15-05:00 0 Answers 61 views 0

Leave an answer

Browse
Browse