.josh Posted August 13, 2013 Share Posted August 13, 2013 http://crayonviolent.com/ItemSlider/ but I mean..it's basically the exact same thing as the demo.. I literally just grabbed it from the "download the source" link on the original http://tympanus.net/codrops/2012/12/31/how-to-create-a-simple-multi-item-slider/ page, and uploaded it to my server. Didn't change anything at all.. Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444903 Share on other sites More sharing options...
justlukeyou Posted August 13, 2013 Author Share Posted August 13, 2013 Hi, Now the page just displays four rows of the images. I notice that you have js/modernizr but I thought it would /js/mo... <script src="js/modernizr.custom.63321.js"></script> I also don't understand how "main" can be be in the HTML but not in the CSS file. The same with "container". Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444904 Share on other sites More sharing options...
.josh Posted August 13, 2013 Share Posted August 13, 2013 Hi, Now the page just displays four rows of the images. I don't know what to tell you.. it works fine on my site and on the demo site. All I can tell you is keep playing the "spot the difference" game. I noticed in the code you posted, you have the same 4 images in each set of ul tags.. I notice that you have js/modernizr but I thought it would /js/mo... What? Are you talking about the leading "/" vs. not having it? Again I have to ask you, do you not understand how pathing works? <script src="http://www.yoursite.com/path/to/script.js"></script> this is an absolute URL, and will point to the exact domain/path/to/file. <script src="/path/to/script.js"></script> this is a relative URL. The leading "/" means to start at the web root. <script src="path/to/script.js"></script> this is a relative URL. Without the leading "/", you are telling the browser to start in the directory the main page is located in. So for example, my script is located at www.crayonviolent.com/ItemSlider/index.html My js script includes show js/.. without the leading "/". This means the browser expects the js file to be located at www.crayonviolent.com/ItemSlider/js/.." If I had a leading "/", it would expect to find the js files at www.crayonviolent.com/js/.. Overall, it doesn't matter what the path is, nor what the filename is, as long as you are correctly pointing to it. This isn't even javascript..this is true for any link, image, anchor tag, script include, etc.. you have on your page. This is basic HTML. I also don't understand how "main" can be be in the HTML but not in the CSS file. The same with "container". What don't you understand? The demo script included a class for those containers. The fact that they didn't actually reference them in the css or js files means it's not relevant to the script. It's a common convention to add a class or id to your html elements, even if you aren't going to explicitly mark them up or reference them at the time. It makes it easier for other people to target or reference them for their own purposes later on down the road. Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444906 Share on other sites More sharing options...
justlukeyou Posted August 14, 2013 Author Share Posted August 14, 2013 Many thanks, I got this working. I reloaded the Javascript files and that sorted it but I cant remember changing the first files I uploaded. I have also found this same code on a site that is trying to sell it. Looks like they stole some free code to make money from it. Naughty. Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444971 Share on other sites More sharing options...
trq Posted August 14, 2013 Share Posted August 14, 2013 Sorry, but I would suggest you find a new hobby. This really isn't working out. Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444973 Share on other sites More sharing options...
justlukeyou Posted August 14, 2013 Author Share Posted August 14, 2013 Sorry, but I would suggest you find a new hobby. This really isn't working out. Couldn't agree with you more. As soon I can finish coding the better. Quote Link to comment https://forums.phpfreaks.com/topic/281139-let%E2%80%99s-create-a-simple-jquery-plugin/page/2/#findComment-1444982 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.