Dynamic Visibility Based on Page Path in Elementor

Facebook
Twitter
Reddit
WhatsApp

jQuery - Hide element

				
					<script>
    jQuery(document).ready(function($) {
        const pagePath = window.location.pathname;
        const footerCTA = $('.footerCTA') // class name
        console.log(pagePath)
        
        if(pagePath === ""){ // Page path
            footerCTA.hide()
        }
    })
</script>
				
			

jQuery - Show element

				
					<style>
    .footerCTA{
    display: none
}
</style>
<script>
    jQuery(document).ready(function($) {
        const pagePath = window.location.pathname;
        const footerCTA = $('.footerCTA') // class name
        
        if(pagePath === ""){ // Page path
            footerCTA.show()
        }
    })
</script>
				
			
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

More to explorer

Elementor Multi-Column Dropdown

https://youtu.be/72L8eLoIrCU Target all dropdown menus @media(min-width:767px) { /* When hovering over a menu item that has children, display its submenu as a

0
Would love your thoughts, please comment.x
()
x

45 Minute Wordpress Support

Get your Wordpress questions answered and your Wordpress issues resolved.