• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Make content disappear Magazine Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Make content disappear Magazine Pro

This topic is: resolved

Tagged: content, disapear, Div, jquery, remove, timed

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 2 months ago by ClintN.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 1, 2015 at 3:11 am #172327
    ClintN
    Participant

    I have some content in a text widget in a Before Header widget area, that I would like to make disappear after a few seconds. Are there any StudioPress themes with any such content areas that I can reference?
    I tried using jQuery that makes the content in a <div> disappear.

    
    var tId;
    
    $("#mydiv").hide().slideDown();
    clearTimeout(tId);
    tId=setTimeout(function(){
      $("#mydiv").hide();        
    }, 3000) 

    This is enqued in functions.php as follows:

    
    //* Enqueue Google Fonts and JS script
    add_action( 'wp_enqueue_scripts', 'magazine_enqueue_scripts' );
    function magazine_enqueue_scripts() {
    
    	wp_enqueue_script( 'magazine-entry-date', get_bloginfo( 'stylesheet_directory' ) . '/js/entry-date.js', array( 'jquery' ), '1.0.0' );
    	
    	wp_enqueue_script( 'magazine-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    
    	wp_enqueue_script( 'media-top', get_stylesheet_directory_uri() . '/js/media-top.js', array( 'jquery' ), '', true );
    	
    	wp_enqueue_style( 'dashicons' );
    	
    	wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400|Oswald:400,500,900|Lora 300,' , array(), CHILD_THEME_VERSION );
    } 

    The content in the text widget is as follows:

    <div id="mydiv" class="site-inner">
    <div style="float:left"><p><img 
    style="width:100%;" src="/wp-content/themes/magazine-pro/images/ms1.png"></p></div>
    <div style="float:left"><img style="width:100%;" src="/wp-content/themes/magazine-pro/images/ms2.png"></div>
    <div style="float:left"><img style="width:100%;" src="/wp-content/themes/magazine-pro/images/ms3.png"></div>
    </div>

    Any tips that help are appreciated as I would really like to make this happen

    http://1c1.13b.myftpupload.com/wp-content/themes/magazine-pro/js/media-top.js
    December 1, 2015 at 7:20 pm #172394
    Sridhar Katakam
    Participant

    Try https://sridharkatakam.com/how-to-hide-a-widget-area-after-a-certain-time-using-jquery/.


    Genesis Tutorials | Follow me on Twitter

    December 2, 2015 at 4:46 am #172420
    ClintN
    Participant

    Nice thanks

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Make content disappear Magazine Pro’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble