Javascript Help v2.0

Discussion in 'Web Programming' started by R, Feb 8, 2013.

Javascript Help v2.0
  1. Unread #1 - Feb 8, 2013 at 9:54 PM
  2. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    Back again, another tumblr script problem.

    So, I have this code for a sidebar dropdown menu, when you click the image it's meant to drop down the links/pages.

    HTML part
    Code:
    <!-- drop down box -->
    <div id="header" class="header-relative">
    	<div style="padding:20px 0px;">
    		{block:IfHeaderImageImage}
    			<img id="imagetitle" src="{image:header image}">
    		{/block:IfHeaderImageImage}
    			
    		{block:IfNotHeaderImageImage}
    			<h1>{Title}</h1>
    		{/block:IfNotHeaderImageImage}
    		
    	    {block:IfNotLinkOnSidebar}
    	    <ul id="linkHeader">
    	        <li><a href="/">Home</a></li>
    	        <li><a href="http://snowfoxtheme.tumblr.com">Theme</a></li>
    	        {block:AskEnabled}
    				<li><a href="/ask" >{AskLabel}</a></li>
    			{/block:AskEnabled}
    			{block:IfLink1title}
    				<li><a href="{text:Link 1 url}">{text:Link 1 title}</a></li>
    			{/block:IfLink1title}
    			{block:IfLink2title}
    				<li><a href="{text:Link 2 url}">{text:Link 2 title}</a></li>
    			{/block:IfLink2title}
    			{block:IfLink3title}
    				<li><a href="{text:Link 3 url}">{text:Link 3 title}</a></li>
    			{/block:IfLink3title}
    			{block:IfLink4title}
    				<li><a href="{text:Link 4 url}">{text:Link 4 title}</a></li>
    			{/block:IfLink4title}
    			{block:IfLink5title}
    				<li><a href="{text:Link 5 url}">{text:Link 5 title}</a></li>
    			{/block:IfLink5title}
    			{block:HasPages} 
               <li><a id="pageLink" href="javascript:void(0)">{text:Page Text}</a></li>
            	{/block:HasPages}
    	    </ul>
    	    <ul id="titlePages" class="titleLinks">
            	{block:HasPages} 
        			{block:Pages} 
    					<li><a href="{URL}" >{Label}</a></li>
    				{/block:Pages}
    			{/block:HasPages}
       	 </ul>
    	    {/block:IfNotLinkOnSidebar}
    	    <div id="headerOpacity"></div>
    	</div>
        <!-- end of drop down box-->
    Description box
    Code:
    <div class="links_list"> 
    <img src="IMAGE URL"> 
    <div class="links_body"> 
    <center> 
    <p><a href="LINK URL">LINK TITLE</a></p>
    <p><a href="LINK URL">LINK TITLE</a></p>
    <p><a href="LINK URL">LINK TITLE</a></p>
    <p><a href="LINK URL">LINK TITLE</a></p>
    </center> 
    </div></div>

    Problem is, it's not displaying it as a clickable image which drops the links down, it's just displaying the image with links underneath before clicking.


    Help? Cheers!
     
  3. Unread #2 - Feb 10, 2013 at 3:13 PM
  4. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    To the top. Still need help.
     
  5. Unread #3 - Feb 15, 2013 at 11:09 AM
  6. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    Bump.
     
  7. Unread #4 - Feb 17, 2013 at 3:21 AM
  8. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    Javascript Help v2.0

    Do you have live example of:
    1. What it's supposed to do
    2. Your attempt

    If you do, PM me the link(s) and I'll take a look.
     
  9. Unread #5 - Feb 18, 2013 at 2:01 PM
  10. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    What it's supposed to do is appear as an image on my sidebar.
    When clicked, links should drop down to go to my links (ask box etc)
    Currently the image and links are showing before I click the image.

    I'd prefer not to share the link if possible, personal blog.
     
  11. Unread #6 - Feb 18, 2013 at 6:02 PM
  12. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    Javascript Help v2.0

    I asked for a link because I'd like to examine the CSS or any JavaScript/jQuery on the page since it looks like it could be a selector issue.


    I can see you copied the header from http://snowfoxtheme.tumblr.com
    But no where on that page can I see dropdown links.
    On this one http://snowfoxtheme-2.tumblr.com/ the pages link has jQuery attached to it.


    So you must have gone to another site and copied something. Perhaps from here: http://academyoftumblr.tumblr.com/post/7118225682/sliding-drop-down-menu ?

    If so, you need to copy this into your theme template
    Code:
    <script type="text/javascript"> 
    $(document).ready(function(){ 
    $(".links_body").hide(); 
    $(".links_head").click(function(){ 
    $(this).next(".links_body").slideToggle('fast'); 
    }); }); </script> 
    <style type="text/css"> 
    .links_list { margin:0px; padding:0px; width:180px;} 
    .links_head { padding-top:5px; padding-bottom:5px; cursor:pointer; position:relative; margin:1px; text-align:center;} 
    .links_body { padding:10px; text-align:left; color: #fff; display:none;} 
    </style>
    Probably just under this code
    Code:
    <script type="text/javascript" src="http://static.tumblr.com/dbek3sy/8Aqmgryi7/jquery_18.js"></script>
    

    If you copied this
    Code:
    <script type="text/javascript" src="http://static.tumblr.com/3ikgvxs/0TGl4zgpu/jquery.min.js"></script> 
    you are loading 2 jquery libraries into the same page which will cause conflicts (And all JS will break) and it will need to be removed.
     
  13. Unread #7 - Feb 18, 2013 at 7:11 PM
  14. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    I've taken the above HTML out of the theme, so it's just a customised theme now. I just want a clickable image to then display the sidebar links. Could you help code this please?
     
  15. Unread #8 - Feb 18, 2013 at 7:37 PM
  16. Jazz00006
    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0

    Jazz00006 Apprentice
    Visual Basic Programmers

    Javascript Help v2.0

    Yes, I can code it.
    But I need to know what I'm working on. I implore you to PM me a link to your site so I can inspect the source myself. I need to know what libraries you are loading and the over all structure of the page.

    I can get it done faster this way, or as an alternative you could send me the tumblr theme source code so I can modify that.
     
  17. Unread #9 - Feb 20, 2013 at 10:43 AM
  18. R
    Joined:
    Apr 4, 2011
    Posts:
    19,571
    Referrals:
    16
    Sythe Gold:
    572
    In Memory of Jon <3 n4n0 Sythe Awards 2013 Winner

    R Legend
    Retired Administrator Roary Donor Mudkips Legendary

    Javascript Help v2.0

    Thanks for your help, working perfectly. Can be closed.
     
< Need an online shopping cart recomendation! | Question regarding a redirect... >

Users viewing this thread
1 guest


 
 
Adblock breaks this site