Results 1 to 6 of 6

Thread: jQuery Treeview Menu - It Just Won't Work For Me!

  1. #1
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default jQuery Treeview Menu - It Just Won't Work For Me!

    1) Script Title: jQuery Treeview Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...view/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

    HTML Code:
    <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>
    HTML Code:
    $(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

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Make the following change

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

  3. #3
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Thanks both..

    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.

  5. #5
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

  6. #6
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    this is what i built out of the demo:

    place this code above the <head> section of your page:
    Code:
    <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:
    Code:
    <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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •