Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichael Matzner
12,651 Pointsgetting swipebox to work in my html
I'm trying to implement swipebox to display my photogallery on my website. I think I'm understanding everything clearly. (this is my first time trying to implement a plugin) I don't understand the term "fire the plugin" last step on git hub says Bind the swipebox behaviour on every link with the "swipebox" class.
$( '.swipebox' ).swipebox();
here is my html code for my photogallery... any advice or insight would be greatly appreciated thank you.
<!DOCTYPE html>
<html>
<head>
<title> POSH|HOME </title>
<link href='https://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="src/css/swipebox.css">
<link rel="stylesheet" href="main1.css">
<link rel="stylesheet" href="responsive1.css">
</head>
<body>
<header>
<h2>CLASSIC STYLE | MODERN SENSIBILITY</h2>
<nav>
<ul>
<li><a href="index.html">POSH|HOME</a></li>
<li><a href="about.html">ABOUT</a></li>
<li><a href="photog.html" class="selected">PHOTO GALLERY</a></li>
</ul>
</nav>
</header>
<a href="ty6 (1 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (2 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (3 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (4 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (5 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (6 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (7 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (8 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (9 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (10 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (11 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (12 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (13 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (14 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (15 of 16).jpg" class="swipebox" title="preview">
<a href="ty6 (16 of 16).jpg" class="swipebox" title="preview">
<footer>
<a href="https://www.instagram.com/posh_home_louisville"><img src="images.jpg" alt="Instagram Logo" class="social-icon"></a>
<a href="https://www.facebook.com/poshhomelouisville"><img src="imgres.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2015 POSH|HOME.</p>
</footer>
<script src="lib/jquery-1.9.0.js"></script>
<script src="src/js/jquery.swipebox.js"></script>
</body>
</html>
```
3 Answers
Jacob Mishkin
23,118 Pointsis the Jquery swipbox in a folder called src?
<script src="src/js/jquery.swipebox.js"></script>
this might be your issue. Outside of not seeing the JS code I would guess this might be the issue.
Michael Matzner
12,651 Pointsno its not i was trying to follow along with the github instructions >>>> https://github.com/brutaldesign/swipebox
I guess I'm just very far off. confused really.
Jacob Mishkin
23,118 PointsI hate to say it, but that link doesn't work just gives back an awesome Obie Wan 404 error, kind of awesome, but I would look at the directory and see if the path is correct.