mindapolis Posted June 2, 2012 Share Posted June 2, 2012 Hi, is a jquery include statement syntax the same syntax as a PHP include statement? Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/ Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 Yes and no.... depends exactly what you're asking. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350458 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 Basically I have a list of words I want to fade in and out on the screen. Do I need to include the jquery.innerfade.js file to make it work? into this page <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> li { list-style-type: none; display:none; } </style> /<meta charset="UTF-8" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> <script type="text/javascript" src="http://www.kbcc.cuny.edu/memorial/jack_taub/Documents/jquery.innerfade.js"></script> <script type="text/javascript"> $(document).ready( function(){ $('#skills').innerFade({ animationType: 'slide', speed: 750, timeout: 2000, type: 'random', containerHeight: '1em' }); } ); </script> </head> <body> <ul id="skills"> <li><a href="#n1">Website Development </a> </li> <li><a href="#n2">Website Maintenance </a></li> <li><a href="#n3">Internet Research</a> </li> <li><a href="#n4">Article Writing</a> </li> <li><a href="#n5">Blogging</a></li> </ul> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350460 Share on other sites More sharing options...
trq Posted June 2, 2012 Share Posted June 2, 2012 Do I need to include the jquery.innerfade.js file to make it work? If you want to use it. oh, and jQuery doesn't have any include method. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350473 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 then how do I make words fade in and out? Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350476 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 oh, and jQuery doesn't have any include method. Not entirely true... $.getScript() is an "include" of sorts, for loading scripts dynamically. and $.load() can be used to load content asynchronously. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350481 Share on other sites More sharing options...
trq Posted June 2, 2012 Share Posted June 2, 2012 Well wouldn't ya know. It's been a long time since I've used jQuery (we use Mootools at work). I should probably check the manual before opening my mouth I guess. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350484 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 OP, what are you trying to do, exactly? Be as specific and verbose as possible. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350485 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 Well wouldn't ya know. It's been a long time since I've used jQuery (we use Mootools at work). I should probably check the manual before opening my mouth I guess. I feel for ya... I'm stuck using Prototype at work. Bleh!!! Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350486 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 I have a list of words & I want each word to fade. What else do you need to know? Well wouldn't ya know. It's been a long time since I've used jQuery (we use Mootools at work). I should probably check the manual before opening my mouth I guess. I feel for ya... I'm stuck using Prototype at work. Bleh!!! Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350573 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 Fade in? Fade out? Both? On event, e.g. load or mouseover/out? All at once? In sequence? Better questions = better answers. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350576 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 one after the other in a sequence Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350603 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 That is not an answer. I'm done here. Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350606 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 umm that DID answer your question. Fade each word in and out in a sequence. What else did you want? ? Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350658 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 There you go... it'll fade them in and out eternally, exactly like you asked. <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var els =[]; function fade(i) { if (els.length <= i) i = 0; var el = els[i]; if (!el) return; if (el.is(':visible')) el.fadeOut(200, function() {fade(i+1)}); else el.fadeIn(200, function() {fade(i+1)}); } $('#skills li').each(function(i, el) { els.push($(el)); }); fade(0); }); </script> </head> <body> <ul id="skills"> <li><a href="#n1">Website Development </a> </li> <li><a href="#n2">Website Maintenance </a></li> <li><a href="#n3">Internet Research</a> </li> <li><a href="#n4">Article Writing</a> </li> <li><a href="#n5">Blogging</a></li> </ul> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350670 Share on other sites More sharing options...
mindapolis Posted June 2, 2012 Author Share Posted June 2, 2012 It 's close, but I want one list item to fade in and out, the next list item fade in and out etc. I was following the example on http://medienfreunde.com/lab/innerfade/ Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350682 Share on other sites More sharing options...
smoseley Posted June 2, 2012 Share Posted June 2, 2012 It 's close, but I want one list item to fade in and out, the next list item fade in and out etc. I was following the example on http://medienfreunde.com/lab/innerfade/ It's not close. It's EXACTLY what you asked for. Since you failed to explain in detail (despite my numerous queries), I filled in the blanks. It may not be what you want, but now you're stuck with it. Maybe you've learned a thing or two about specification in the process. Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350685 Share on other sites More sharing options...
mindapolis Posted June 3, 2012 Author Share Posted June 3, 2012 NO IT'S NOT. Maybe if you read the entire thread maybe we wouldn't have this miscommunication. Why are you being so mean? I'm trying my best! one after the other in a sequence Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350692 Share on other sites More sharing options...
smoseley Posted June 3, 2012 Share Posted June 3, 2012 I'm being mean to drill into your head that vagueness is a bad thing when asking for help. I see now that what you were asking for is a slideshow (or carousel). Choice of words is important in this industry. Do your research and learn what to call things when you talk about them, or you'll get lots of mixed up answers, and you'll frustrate people and waste their time. If you can't at least figure out the name... post a link to an example of what you're looking for. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350720 Share on other sites More sharing options...
mindapolis Posted June 4, 2012 Author Share Posted June 4, 2012 First, I don't think you need to be mean to drill something into someone. That only frustrates them more. Second, after you mention slideshow I found a tutorial that I am using and I got it working! Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350976 Share on other sites More sharing options...
smoseley Posted June 4, 2012 Share Posted June 4, 2012 Well, it was a combination of me not knowing what you were talking about and trying to explain that you need to explain yourself better. Glad you found what you were looking for. Hope you learned something about specification in the process. Quote Link to comment https://forums.phpfreaks.com/topic/263517-jquery-questions/#findComment-1350988 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.