Note that there are some explanatory texts on larger screens.

plurals
  1. POjsfiddle creation not transferring to website
    primarykey
    data
    text
    <p>I modified a simple image slider in jsfiddle and can't figure out why I can't get it to work on my first clients website. Works fine in jsFiddle but not on the site.</p> <p>It uses a couple other plugins for smooth scrolling (which I think I broke trying to transfer this over =/). This is one of my first 'clients' I took on to get my development portfolio going.</p> <p>Here is a link to the jsFiddle code - <a href="http://jsfiddle.net/SbDpR/" rel="nofollow">http://jsfiddle.net/SbDpR/</a></p> <p>JS snippet</p> <pre><code>$(document).ready(function() { var height = 340, width = 740, slides = 5, contentNum = 1; $('.testing').html("Content Number - " + contentNum); $('.main_inner').css({ width: slides * width }); $('.next a').click(function(){ if (contentNum &lt; slides) { $('.main_inner').animate({ marginLeft: '-' + (width * contentNum) }, 600); contentNum = contentNum + 1; $('.testing').html("Content Number - " + contentNum); } else { $('.main_inner').animate({ marginLeft: '0' }, 600); contentNum = contentNum / contentNum; $('.testing').html("Content Number - " + contentNum); } return false; }); $('.previous a').click(function(){ if (contentNum &gt; 1) { $('.main_inner').animate({ marginLeft: '+=740' }, 600); contentNum = contentNum - 1; $('.testing').html("Content Number - " + contentNum); } else { $('.main_inner').animate({ marginLeft: '-2960' }, 600); contentNum = 5; $('.testing').html("Content Number - " + contentNum); } return false; }); });​ </code></pre> <p>Here is a link to the site to see it in action - <a href="http://skeptikalmedia.com/MOM/index.html" rel="nofollow">http://skeptikalmedia.com/MOM/index.html</a></p> <p>I've spent the last 4 hours trying to get it to work on the live site. I've copied/pasted/deleted/copied/pasted. Currently the script sits on the index page to make sure I didn't miss importing a file or something. </p> <p>Any ideas? I'm to the point where I'd almost pay for someone to tell me why it's not working or turn the JSFiddle into a jQuery plugin.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload