{ Dev Farm }

Web & Windows Development

Problem hide/show map and track

Home Forum Wp Gpx Maps Support Problem hide/show map and track

  • Questo topic ha 1 risposta, 1 partecipante ed è stato aggiornato l'ultima volta 10 anni, 9 mesi fa da followthefloo.
Stai visualizzando 2 post - dal 1 a 2 (di 2 totali)
  • Autore
    Post
  • #25375 Rispondi
    followthefloo
    Ospite

    Hi guy,

    First many thanks for this great pluggin!

    Currently I’m doing a world tour by bicycle and I would like to publish my daily’s tracks.
    I would like to put all my tracks on the same page and using a pluggin (like Content Reveal) to show/hide each one.

    http://www.followthefloo.com/test
    Exemple: http://www.followthefloo.com/test/
    But when I show the track (test 1) the map isn’t anymore centered on the track and the graph is oversized.
    If the track is showed when the page is loaded (test 2) I don’t get any problem.

    Do you have any solutions for me?

    Many thanks in advance,

    Followthefloo

    #25381 Rispondi
    followthefloo
    Ospite

    Problem solved.

    For those who want to do the same.

    http://www.creazo.fr/affichermasquer-texte-slide-toggle-jquery/

    Afficher/Masquer un texte : Slide Toggle avec jQuery

    L’effet Slide Toggle est un effet qui peut-être utile quand vous voulez masquer un texte en particulier, mais que vous souhaitez tout de même laisser la possibilité d’afficher/masquer celui-ci via un lien.

    Vous pouvez voir un exemple sur cette page où le formulaire de contact est masqué par défaut, un simple clic sur contact vous permet de le révéler.

    Activer jquery
    Pour reproduire ceci vous allez avoir besoin d’accéder à votre fichier header.php afin de charger la bibliothèque jQuery via cet ajout avant wp_head entre les balises <head> de votre projet :

    <?php wp_enqueue_script(‘jquery’); ?>

    Ensuite, vous devez insérer soit dans un fichier JavaScript, soit dans le thème directement après wp_head (<script>LE CODE</script>) le code suivant :

    <script>
    jQuery(document).ready(function() {
    jQuery(‘#slideMe’).hide();
    jQuery(‘a#clickMe’).click(function() {
    jQuery(‘#slideMe’).slideToggle(400);
    return false;
    });
    });
    </script>

    Afficher / Masquer son texte
    A partir de maintenant, vous n’avez plus qu’à spécifier dans n’importe quelle page ou article cette tournure afin d’appliquer votre effet Afficher/Masquer

    Un lien

    Texte masquer par défaut

    Explication sur la méthode utilisée :
    jQuery(‘#slideMe’).hide(); : permet de cacher votre div lorsque votre page est chargée. Remplacer .hide() par .show() si vous ne voulez pas faire disparaître votre div.

    jQuery(‘#slideMe’).slideToggle(400); : permet l’effet visuel slide, 400 millisecondes d’animation est attribué, vous pouvez le changer.

    All the best,

    followthefloo

    http://www.followthefloo.com

Stai visualizzando 2 post - dal 1 a 2 (di 2 totali)
Rispondi a: Problem hide/show map and track

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Le tue informazioni:




Non è possibile lasciare nuovi commenti.