• 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

jQuery make 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 › jQuery make disappear Magazine Pro

This topic is: not resolved

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

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 3 months ago by Victor Font.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 1, 2015 at 3:05 am #172326
    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.

    My failed attempt at using a jQuery file http://1c1.13b.myftpupload.com/wp-content/themes/magazine-pro/js/media-top.js is as follows:

    
    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:// http://1c1.13b.myftpupload.com/
    December 1, 2015 at 9:28 am #172349
    Victor Font
    Moderator

    I would use the ID of the text widget in your jQuery rather than the div inside the text widget. Can't help you further unless you post a link tot he site.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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