comparison index.php @ 41:e122e4e55e75

No need to wait for document ready since it's already at the bottom of the page.
author nanaya <me@myconan.net>
date Sun, 24 May 2015 17:21:04 +0900
parents 12eabc73a441
children ddb5458658d2
comparison
equal deleted inserted replaced
40:12eabc73a441 41:e122e4e55e75
199 <script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.min.js"></script> 199 <script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.min.js"></script>
200 200
201 <script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js"></script> 201 <script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js"></script>
202 202
203 <script> 203 <script>
204 $(document).ready(function() { 204 $("table td a").each(function() {
205 $("table td a").each(function() { 205 if (!this.href.match(/\.(jpe?g|png|gif|webp)$/i)) return
206 if (!this.href.match(/\.(jpe?g|png|gif|webp)$/i)) return 206 this.className = "image"
207 this.className = "image" 207 this.setAttribute("title", this.innerHTML)
208 this.setAttribute("title", this.innerHTML) 208 })
209 }) 209
210 210 $("table > tbody").magnificPopup({
211 $("table > tbody").magnificPopup({ 211 delegate: "a.image",
212 delegate: "a.image", 212 type: "image",
213 type: "image", 213 gallery: { enabled: true }
214 gallery: { enabled: true }
215 })
216 }) 214 })
217 </script> 215 </script>
218 </body> 216 </body>