Partage
  • Partager sur Facebook
  • Partager sur Twitter

boostrap twitter

Plusieurs fonction sur un lien

    27 novembre 2011 à 16:10:09

    Bonjour,

    Voila j'utilise le bootstrap twitter, plus précisément les plugins "Modals" et "Popover", qui permet de passer la souris et d'avoir une bulle d'info qui apparaît pour le Popover et une box pour le Modals.

    Je vous met le liens ici

    J'aimerais Que lorsque je passe la souris, j'appel la fonction popover et lorsque je clique la fonction Modals, je ne comprend pas comment faire.

    Si quelqu'un pourrait m'expliquer merci :)

    Mon code:
    <head
        <!-- Le javascript -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-modal.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-alerts.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-twipsy.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-popover.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-dropdown.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-scrollspy.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-tabs.js"></script>
        <script src="http://twitter.github.com/bootstrap/1.4.0/bootstrap-buttons.js"></script>
    
        <!-- Le styles -->
        <link href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.css" rel="stylesheet">
            
    </head>
    
    <body>
        <div class="well">
        <p class="muted">Tight pants next level keffiyeh
        <a href="#" rel="twipsy" title="Some title text">you probably</a>
        haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel
        <a href="#" rel="twipsy" data-original-title="Another twipsy">have a</a>
        terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A <a href="#" rel="twipsy" title="Another one here too">really ironic</a> artisan whatever keytar, scenester farm-to-table banksy Austin <a href="#" rel="twipsy" data-original-title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
        </p>
        <a href="#" onclick='<a class="btn" data-controls-modal="my-modal" data-backdrop="static" >Launch Modal</a>' class="btn danger" rel="popover" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A title">hover for popover</a>
        </div>
        
        <a href="#" data-placement="below" rel='twipsy' title='Some title text'>text</a>
        <button id="test" data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
        <a href="#" id="test" data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" >Btn</a>
        
        <div id="modal-from-dom" class="modal hide fade">
                <div class="modal-header">
                  <a href="#" class="close">×</a>
                  <h3>Modal Heading</h3>
                </div>
                <div class="modal-body">
                  <p>Salutttttttttt</p>
                </div>
                <div class="modal-footer">
                  <a href="#" class="btn primary">Primary</a>
                  <a href="#" class="btn secondary">Secondary</a>
                </div>
              </div>
        
        <script type="text/javascript">
                    $(function () {              $("a[rel=twipsy]").twipsy({                live: true              })            })
                    $(function () {              $("a[rel=popover]")                .popover({                  offset: 10                })                .click(function(e) {                  e.preventDefault()                })            })          
    
        </script>
        
    </body>
    
    • Partager sur Facebook
    • Partager sur Twitter

    boostrap twitter

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown