Jump to content
Sign in to follow this  
sparh

Ouvrir un lien externe à partir d'un Jquery UI Accordion

Recommended Posts

Bonjour,


Pour Jquery Ui Tabs j'utilise le code ci-dessous qui me permet d'ouvrir des onglets comme lien :


html



<div class="tabs">
<ul>
<li><a href="#tabs-1">Tab</a></li>
<li class="tabouvre"><a href="http://mydomain.com/unepage.html">Tab</a></li>
<li><a href="#tabs-3">Tab</a></li>
</ul>
<div id="tabs-1"></div>
<div id="tabs-2"></div>
<div id="tabs-3"></div>
</div>

et js:



$(“.tabs”).tabs({
beforeLoad: function( event, ui ) { e.preventDefault(); }
});
$(“.tabouvre a”).unbind(‘click’);

J'aimerai faire la même chose avec l'Accordeon de Jquery UI, ce qui donnerai :


html



<div class="accordion">
<h3><a href="#tabs-1">Tab</a></h3>
<div id="tabs-1"></div>
<h3 class="tabouvre"><a href="http://mydomain.com/unepage.html">Tab</a></h3>
<div id="tabs-2"></div>
<h3><a href="#tabs-3">Tab</a></h3>
<div id="tabs-3"></div>
</div>

js



$('.accordion').accordion({
beforeActivate: function( event, ui ) { e.preventDefault(); }
});
$(".tabouvre a").unbind('click');

Mais bien sur si je fais appelle à vous c'est que ça ne marche pas !


Si vous avez une idée pour m'aider ?


Merci d'avance


Edited by sparh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By dexcom
      Bonjour , j'ai créer un menu accordion vertical pour un bookstrap via dreamweaver jusque la pas de soucis , tout se présente comme je le souhaite , j'ai télécharger un template et y fait quelque modification , le problème quand je suis sur la page de mon menu si je scroll un peu vers le bas et que je choisi menu déggustation exemple j'ai mon image qui part vers le haut , je suis obliger de remonter ma page pour voir le début
       
      Si quelqu'un a une idée merci de votre aide
      .panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1 <!-- price start ============================ --> <section id="price"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="block"> <h1 class="heading wow fadeInUp" data-wow-duration="300ms" data-wow-delay="300ms"><span> Notre carte </span></h1> <div class="panel-group" id="accordion1"> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne1" rel="nofollow" target="_blank"> - Le Menu du jour </a> </h4> </div> <div id="collapseOne1" class="panel-collapse collapse"> <div class="panel-body"><center><img src="file:///C|/Users/utilisateur-pc/Desktop/Nouveau dossier/Platdujour.png"></center></div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo2" rel="nofollow" target="_blank"> - Le menu Dégustation </a> </h4> </div> <div id="collapseTwo2" class="panel-collapse collapse"> <div class="panel-body"><center><img src="file:///C|/Users/utilisateur-pc/Desktop/Nouveau dossier/Mdeggustation.png" ></center></div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo21" rel="nofollow" target="_blank"> - Nos suggestions enfants - maximum 12 ans </a> </h4> </div> <div id="collapseTwo21" class="panel-collapse collapse"> <div class="panel-body"><center><img src="file:///C|/Users/utilisateur-pc/Desktop/Nouveau dossier/Mdeggustation.png"></center></div></div></div></div> <h1 class="heading wow fadeInUp" data-wow-duration="300ms" data-wow-delay="300ms"><span> Les entrées </span></h1> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne3" rel="nofollow" target="_blank"> - les entrées froides </a> </h4> </div> <div id="collapseOne3" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne4" rel="nofollow" target="_blank"> - les entrées chaudes </a> </h4> </div> <div id="collapseOne4" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne5" rel="nofollow" target="_blank"> - Les potages </a> </h4> </div> <div id="collapseOne5" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <h1 class="heading wow fadeInUp" data-wow-duration="300ms" data-wow-delay="300ms"><span> Les viandes </span></h1> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne6" rel="nofollow" target="_blank"> - Le porc </a> </h4> </div> <div id="collapseOne6" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne7" rel="nofollow" target="_blank"> - L'agneau de Bellac ( France ) </a> </h4> </div> <div id="collapseOne7" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne8" rel="nofollow" target="_blank"> - Le veau </a> </h4> </div> <div id="collapseOne8" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne9" rel="nofollow" target="_blank"> - Le boeuf b.b.b </a> </h4> </div> <div id="collapseOne9" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne10" rel="nofollow" target="_blank"> - Le boeuf charolais ( Sélection Bigard - France ) </a> </h4> </div> <div id="collapseOne10" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne11" rel="nofollow" target="_blank"> - Les volailles </a> </h4> </div> <div id="collapseOne11" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> <h1 class="heading wow fadeInUp" data-wow-duration="300ms" data-wow-delay="300ms"><span> Les poissons </span></h1> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion1" href="#collapseOne12" rel="nofollow" target="_blank"> - Les poissons </a> </h4> </div> <div id="collapseOne12" class="panel-collapse collapse"> <div class="panel-body"> menu1 </div></div></div> </div></div></div></div> </section><!-- #price close -->  
       
       
×
×
  • Create New...