Quote:
Originally Posted by dasaxena I have this working .... if any one needs help.... post a message in this thread and i will post the code i used. |
I have read the instructions properly but can not seem to get this function to work...
I am using Pligg 1.0.3 wistie template. I already have the jquery.js in my js folder due to the jquery module. also, i have tried to enter the suggested code into a create page. The page was create via admin>manage>pages.
Please let me know what i am doing wrong... This is what i added to the page content:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Digg-style FAQ page</title>
<script type="text/javascript" src="jquery.js"> </script>
<script type="text/javascript">
$(document).ready(function() {
$("a[name^='faq-']").each(function() {
$(this).click(function() {
if( $("#" + this.name).is(':hidden') ) {
$("#" + this.name).fadeIn('slow');
} else {
$("#" + this.name).fadeOut('slow');
}
return false;
});
});
});
</script>
<style type="text/css">
.faq-answer {
display:none;
}
</style>
</head>
<body>
<a href="#" name="faq-1">What is Digg like FAQ?</a><br />
<div class="faq-answer" id="faq-1">It's like this: http://www.digg.com/faq<br /><br /></div>
<a href="#" name="faq-2">Is it easy to make?</a><br />
<div class="faq-answer" id="faq-2">Yes it's very easy to make!<br /><br /></div>
<a href="#" name="faq-3">Why would I want to do that?</a><br />
<div class="faq-answer" id="faq-3">And your page will be so much cleaner.<br /><br /></div>
</body>
</html>
Please let me know what i am doing wrong... if i need to place a jquery download in the correct folder... or if i am place things in the wrong place.... THANK YOU SO MUCH