Guest User

Untitled

a guest
Oct 22nd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. $(document).ready(function() {
  2. $("div.bhoechie-tab-menu>div.list-group>a").click(function(e) {
  3. e.preventDefault();
  4. $(this).siblings('a.active').removeClass("active");
  5. $(this).addClass("active");
  6. var index = $(this).index();
  7. $("div.bhoechie-tab>div.bhoechie-tab-content").removeClass("active");
  8. $("div.bhoechie-tab>div.bhoechie-tab-content").eq(index).addClass("active");
  9. });
  10. });
  11.  
  12. <div class="bhoechie-tab-menu">
  13. <div class="list-group">
  14. <a href="#" class="list-group-item active "> TAB1 </a> <a href="#" class="list-group-item "> TAB2 </a> <a href="#" class="list-group-item ">TAB1 </a> <a href="#" class="list-group-item"> TAB1 </a>
  15. <div>
  16. <div class="bhoechie-tab">
  17. <div class="bhoechie-tab-content active">
  18. <section> </section>
  19. </div>
  20. <div class="bhoechie-tab-content">
  21. <section> </section>
  22. </div>
  23. <div class="bhoechie-tab-content">
  24. <section> </section>
  25. </div>
  26. <div class="bhoechie-tab-content">
  27. <section> </section>
  28. </div>
  29. </div>
  30.  
  31. function showVehicle(id){
  32. var container = $("#id_administrator");
  33. var form = "";
  34. $.ajax({
  35. url: "forms/show.php",
  36. type:'POST',
  37. data:{"vreg":id},
  38. async:false,
  39. }).done(function(data){
  40. form= data;
  41. });
  42.  
  43. container.html(form);
  44. }
Add Comment
Please, Sign In to add comment