Little help |
Little help |
![]()
Post
#1
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
Well, I'm going to lighten this place up a bit. See, recently, I made a Tumblr and I used a pretty simple theme that I adjusted to my liking. There's just one thing I want to do it though and that's being able to make all my links fade in and out. Of course, I'm using the jQuery Javascript library to help me out on this but for some reason, I can't seem to get the links to work like I want them to. So, I might need some help.
Come hither. I'm currently using the latest jQuery, jQuery 1.4.1, and I created a function in a separate Javascript file called fade.js. Here's fade.js: CODE jQuery.fn.fade = function(settings) { settings = jQuery.extend({ color: '#A0A0A0', duration: 500 }, settings); return this.each(function() { var original = $(this).css('color'); $(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); }); $(this).mouseout(function() { $(this).animate({ color: original },settings.duration); }); }); }; and here's the little Javascript I'm using on my main Tumblr page: CODE <script type="text/javascript"> $(document).ready(function() { $('a').fade({ color: '#F3F1F1', duration: 700 }); }); </script> I've also tried using a class in the Javascript (i.e. - .fade) which was used in some test links but that didn't work either. I don't know if it's a conflict with where I have the files hosted (my own site) and if it should be hosted on Tumblr (which I don't think I can do, or I don't know how) and I noticed Tumblr uses Prototype so I don't know if that would be issue (because I'm pretty sure jQuery and Prototype do not work well together, however, I don't see any Prototype files included on my page). It's been quite annoying and I'd appreciate it if someone could lighten my day with some mystical solution. And with that, I bid adieu. |
|
|
![]() |
![]()
Post
#2
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 8,629 Joined: Jan 2007 Member No: 498,468 ![]() |
^TJ and Gabrielle.
![]() |
|
|
![]()
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 7,063 Joined: Jul 2008 Member No: 670,288 ![]() |
^TJ and Gabrielle. ![]() LOL, I've never made a Tumblr theme in my life Nat. :P |
|
|
![]()
Post
#4
|
|
![]() Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrator Posts: 8,629 Joined: Jan 2007 Member No: 498,468 ![]() |
http://i18.photobucket.com/albums/b127/gut...zibit_AG036.jpg LOL, I've never made a Tumblr theme in my life Nat. :P Haha oh whoops. I thought you did. Imy, btw |
|
|
![]() ![]() |