PDA

View Full Version : jQuery Treeview Menu - It Just Won't Work For Me!



bambam
02-12-2009, 11:29 AM
1) Script Title: jQuery Treeview Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm

3) Describe problem:

I really don't know what I'm doing wrong. I copied the entire css into my stylesheet in case that was the problem, but no! Below is the html concerned and the code in demo.js



<ul id="collapse">
<li><strong>Effects</strong> – types of
<ul>
<li><strong>Chorus</strong> – yes, everyone knows that the chorus is the repeated, catchy bit in a song. But did you know that it is also an effect which takes a sound and plays it over itself in a slightly changed way to make it sound like more than one instruments are playing?</li>
<li><strong>Delay</strong> – echo that repeats the sound e.g. ECHO-ECHo-ECho-Echo-echo</li>
<li><strong><a href="http://music.booseytracks.com/search/html/popup_cddetails_i.php?cdkurz=SCD048829&w=tr&" target="_blank">Phaser/Flanger</a></strong> – The first is not a space-age gun and the second is not at all what you’re thinking. These are effects which put a sound in and out of time with itself creating whooshing and/or space-age sounds</li>
<li><strong><a href="http://music.booseytracks.com/search/html/popup_cddetails_i.php?cdkurz=STRP000206&w=tr&" target="_blank">Reverb</a></strong> – echo that sustains the sound e.g. echo-o-o-o-o-o-o</li>
</ul>
</li>
</ul>




$(document).ready(function(){

$("#collapse").treeview({
collapsed: true,
animated: fast,
unique: false,
persist: "location"
});


});



Let me know if any more information is needed, it's a bit of a head against a brick wall situation!

Thanks :D

codeexploiter
02-12-2009, 12:07 PM
Make the following change



$(document).ready(function(){
$("#collapse").treeview({
collapsed: true,
animated: "fast",
unique: false,
persist: "location"
});
});

moscarda
02-12-2009, 06:31 PM
i fought against this one for ages, before finally just downloading the demo pages and changing those instead of starting from scratch. can;t go wrong that way.

bambam
02-13-2009, 10:28 AM
thanks guys, I added the " marks but now the sub clauses have disappeared and clicking anywhere doesn't bring them back! Do I need to determine how the tree is displayed?

I did build the js out of the demo btw! The only way I could have done it with my experience.

bambam
02-16-2009, 10:15 AM
Can anyone help?

I can see the top of the tree but there's nowhere to click and if I click on the top word, nothing else appears

moscarda
02-16-2009, 01:50 PM
this is what i built out of the demo:

place this code above the <head> section of your page:


<link rel="stylesheet" href="jquery.treeview.css" />
<link rel="stylesheet" href="screen.css" />
<script src="jquery.min.js" type="text/javascript"></script>
<script src="jquery.cookie.js" type="text/javascript"></script>
<script src="jquery.treeview.js" type="text/javascript"></script>
<script src="system/tree.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#browser").treeview();
});
</script>


then, in the body:


<div id="main">
<h4>Title</h4>
<ul id="browser" class="filetree">
<li class="closed"><img src="images/folder.gif" /> Effects -types of

<ul>
<li><img src="images/file.gif" /> Chorus</li>
<li><img src="images/file.gif" /> Delay</li>
<li><img src="images/file.gif" /> Etc</li>
<li><img src="images/file.gif" /> Etc</li>
</ul>
</li>
</ul>
</div>


btw - the file an folder images shoul be included in the demo files