View Full Version : Who has experience with JQuery?
deronsizemore
09-11-2007, 03:08 PM
I'm needing to do list of fading images such as what they've got here in this example: InnerFade with jquery (http://medienfreunde.com/lab/innerfade/)
I'm not quite sure where to start though. Example, where does "The Call" go? I'm lost (keep in mind I'm not a programmer, so this all might as well be another language to me).
tetsujin
09-11-2007, 03:18 PM
Ok, this isn't too bad when you wade through the bad example. The main thing you need to do is scroll to the bottom and download jquery.innerfade.zip extract that and put the js folder on your webserver.
then put this in your head Note the notes in [brackets]
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.innerfade.js"></script>
<script type="text/javascript">
$(document).ready(
function(){
$('[name of your div or element]').innerfade({
animationtype: 'slide',
speed: 750,
timeout: 2000,
type: 'random',
containerheight: '1em' [these all explain themselves]
});
});
</script>
And that should be everything you need to do to use the innerfade effect!
Cameron
deronsizemore
09-11-2007, 04:49 PM
Ok, this isn't too bad when you wade through the bad example. The main thing you need to do is scroll to the bottom and download jquery.innerfade.zip extract that and put the js folder on your webserver.
then put this in your head Note the notes in [brackets]
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.innerfade.js"></script>
<script type="text/javascript">
$(document).ready(
function(){
$('[name of your div or element]').innerfade({
animationtype: 'slide',
speed: 750,
timeout: 2000,
type: 'random',
containerheight: '1em' [these all explain themselves]
});
});
</script>
And that should be everything you need to do to use the innerfade effect!
Cameron
Ah, that doesn't seem as bad now. I did download the .zip file and I see that after extracting, it gives me one folder called "jquery.innerfade" and inside that folder I have "css," "images," and "js" folders plus an index.html file.
Do I ONLY need to upload the "js" folder to my web sever or do I need to upload the whole "jquery.innerfade" folder?
Thanks
tetsujin
09-11-2007, 04:52 PM
Just the JS file, the rest of the folders are for his index.html file
Cameron
deronsizemore
09-11-2007, 06:26 PM
Just the JS file, the rest of the folders are for his index.html file
Cameron
Cool, thanks! I appreciate the help. I'll post back if I have any problems.
deronsizemore
09-11-2007, 07:49 PM
Ok, ran into a small problem.
I'm getting a javascript error in Internet Explorer 7 (but it works fine with IE7 on the innerfade site in my first post). It also works in Firefox just fine.
Here is what I'm getting:
Line: 56
Char: 11
Error: Object doesn't support this property or method
Code: 0
URL: Kentucky School Boards Association (http://test.ksba.org)
Here is the test site where I'm trying to set this up: Kentucky School Boards Association (http://test.ksba.org)
Here is the exact code I'm using:
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.innerfade.js"></script>
<script type="text/javascript">
$(document).ready(
function(){
$('#innerfade').innerfade({
speed: 'slow',
timeout: 8000,
type: 'random',
containerheight: '200px'
});
});
</script>
<div id="secondary-header-right">
<ul id="innerfade">
<li><img src="/images/image.jpg" title="image 1" alt="image1" /></li>
<li><img src="/images/image2.jpg" title="image 2" alt="image2" /></li>
<li><img src="/images/image3.jpg" title="image 3" alt="image3" /></li>
<li><img src="/images/image4.jpg" title="image 4" alt="image4" /></li>
<li><img src="/images/image5.jpg" title="image 5" alt="image5" /></li>
</ul>
</div>
Any ideas?
tetsujin
09-11-2007, 11:27 PM
It actually works fine for my in IE7...so I don't know if I can help you exactly...
When in doubt maybe change the element name because sometimes when Javascript starts seeing the same thing twice it gets really weird.
Maybe change the div id to fader or something like that...
Cameron
deronsizemore
09-12-2007, 12:02 AM
It actually works fine for my in IE7...so I don't know if I can help you exactly...
When in doubt maybe change the element name because sometimes when Javascript starts seeing the same thing twice it gets really weird.
Maybe change the div id to fader or something like that...
Cameron
Hey Cameron,
Yeah, funny thing is that now that I'm home, it's working fine here also. At work was where I was getting the error, so maybe it's something to do with our Firewall. I'll have to test it tomorrow. The weird thing is that when it wasn't working at work, I was still able to access the example website with no errors so I knew it 'should' work. Yeah, I actually did try to change the unordered list name from innerfade to just "test" and it still gave the error, but like I said, it's not now, so I'll have to test tomorrow.
I appreciate your help!
tetsujin
09-12-2007, 01:37 AM
No problem, still curious why it would do that, it might be a service pack mismatch or functionality blocking. That happens at work places sometimes.
Glad I could help, have a good day!
Cameron
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.