Skip to content

Commit

Permalink
detect 404 image and remove
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Aug 6, 2016
1 parent c3f338d commit 0083dcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
5 changes: 5 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
$(function() {
$( '.swipebox' ).swipebox();

$( 'img' ).bind('error', function(ev) {
//error has been thrown
$(this).remove();
});
});
19 changes: 3 additions & 16 deletions views/index_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,16 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Start Bootstrap</a>
<a class="navbar-brand" href="#">表特東大</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>資料來源:<a href="https://www.facebook.com/BeautyNTTU/?fref=ts">表特東大</a></h2>
<p>僅提供瀏覽,欣賞</p>
<?php echo $data; ?>
</div>
</div>
Expand Down

0 comments on commit 0083dcd

Please sign in to comment.