1 2 3 4 5 | Lightbox Javascript and Bootstrap Javascript <link rel= "stylesheet" href= "/lightbox.css" type= "text/css" media= "screen" /> <script src= "/prototype.js" type= "text/javascript" ></script> <script src= "/scriptaculous.js?load=effects,builder" type= "text/javascript" ></script> <script src= "/lightbox.js" type= "text/javascript" ></script> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Sample : http: //www.thaiall.com/marry_dropdown.htm Sample : http: //www.thaiall.com/marry_menu.htm Edit code : http: //www.thaiall.com/prototype.js hide: function (element) { /* File : prototype.js (Prototype JavaScript framework, version 1.6.0.2) แฟ้มนี้ถูกเรียกใช้สำหรับ lightbox (อ่านเพิ่มเติมใน http://www.thaiall.com/web2) เมื่อเรียกแฟ้มนี้ใน webpage ที่ใช้ทั้ง lightbox และ bootstrap : dropdown nav menubar พบปัญหาเมื่อสิ่งปิด dropdown ของ bootstrap จะทำให้ตัวเลือก top-menu หายไป พร้อม sub-menu แก้ไขโดยตรวจสอบว่า className นี้เป็นของ bootstrap หรือไม่ ซึ่งไม่พบว่า dropdown ถูกใช้ใน lightbox เมื่อใช้งานตามปกติ alert($(element).className); */ if ($(element).className.indexOf( "dropdown" ) > -1) return element; // $(element).style.display = 'none' ; return element; }, |