Javascript HELP!!!
- Started
- Last post
- 25 Responses
- timkortman0
YES!!! Thank you so much!!! Now that I look at it...I'm sure I would have eventually figured it out. To close to the project I guess. Anyways, thanks so much. You saved me a lot of time and effort. Cheers
- acescence0
remove this line to fix the javascript:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
the header disappearing is because there's an extra closing div tag
- timkortman0
ok i updated it. so it messes up my header as well as the script for the thumbnail display. what do you think?
- acescence0
it looks like it's not a conflict actually, you don't need to change the $.
just make sure you don't source jquery in twice, that will break things.
update it and i'll take a look.
- timkortman0
once you look at that let me know and then i will add the jquery and show you what it does.
- timkortman0
ok...here is the site and how it should look...minus the thumbnail problem.
- acescence0
I'll have to see a link.
- timkortman0
acescence, I tried that but it didn't fix the problem.
- acescence0
yeah, that's a conflict with another javascript library. just change all of the instances of the dollar sign to jQuery:
jQuery(document).ready(function...
jQuery("#fadeBlock").hide();
jQuery("#clicky").click(function...
jQuery("#fadeBlock").fadeIn('fas... function() {
jQuery("body").click(function(){
jQuery("#fadeBlock").fadeOut();
jQuery("body").unbind("click");
});
});
});
});- well it screwed it all up here, but you get the idea.acescence
- timkortman0
acescence, this works perfectly, but I am currently using a modified version of foliogrid(wordpress templete), and the jquery seems to effect the functionality of the other scripts that are in that theme. Does this sound right to you or is this something I did?
- acescence0
this will behave like the marquecreative example, the link fades it in and clicking anywhere in the body will fade it out again.
- 3030
@timkortman - then go for jQuery; if you need some help, you can e-mail me.
- timkortman0
303, I am completely fine with whatever will be the easiest and achieve the effect I am looking for.
The fact of the matter is that I am a designer and not developer and am trying to implement this onto my personal site, but to no avail. I am just looking for an easy solution that I (knowing html, css & php) can use.
- 3030
@acescence - I saved file on my disk and it is 70.48KB big;
However, FireBug shows 24.1KB even when I clear my cache? Is it due to file hosted on Google CDN?
- 3030
timkortman, don't fuck around with native JS just for this one tiny effect. Go for jquery - it will save your time and some nerves. Those libraries were written for a reason.
It is good to know JS basics and syntax before you get yourself familiar with jQuery or other JS libraries.
- timkortman0
Ok, basically I am trying to achieve the effect that marquecreative.com has on their site on the top right hand side but without using flash. I dont need forms like they have just a some text inside the box.
- 3030
@acescence - this one below is 24.1KB big
http://ajax.googleapis.com/ajax/…- no it's not, it's 70.48kacescence
- it's usually 0k if you use the google cdn version...kingsteven
- acescence0
of course, if that's the only javascript you'll be using on a site, it may be better to just use a handcoded script like this than an extra 72k library and http request.