We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15152
    • 360 Posts
    I have used Lightbox on some of my content pages without problems. Recently, I switched my left-side menu to a version of a jquery accordian. Now the Lightbox won’t work. Anyone got a fix for this?

    Go here to see:

    http://impress-design.com/Saturday-Night-Sketch

    Left side menu works, the image won’t pop-up.

    Thanks
      There are no boring projects. Only boring executions. ~ Etzkorn
      www.impress-design.com
      • 20413
      • 2,877 Posts
      I have the same problem with my mootools accordion. You might solve it by http://docs.jquery.com/Using_jQuery_with_Other_Libraries
      and if you do I will convert.

      Im looking into this one --> http://www.stickmanlabs.com/accordion/
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 23299
        • 1,161 Posts
        I sort of went around with this.

        In the end I had to fiddle with the order in which I presented the JS. I also find that some of the jQuery calls need specific versions of the jQuery library.

        I would try seeing if you can get Lightbox to work without the accordian code present. If you can then try adding it back but experiment where you add it. In the end I got this sorted out after some experimentation. Pay attention to which version of the library works for each call as you work through this.

        But I am a total script novice though...
          • 7231
          • 4,205 Posts
          You might solve it by http://docs.jquery.com/Using_jQuery_with_Other_Libraries
          I think this will work. Or use a jQuery powered script for the images.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 23299
            • 1,161 Posts
            Interesting system you have going here.

            I don’t mean to hijack your thread here but I would be interested on how you implemented Wayfinder to get it working with the accordion. I like how you have integrated Ditto and Jot here as well.

            I have noticed that a bunch of the online examples of the accordion menu do not use unordered lists?

            Max

            PS: any news on the Lightbox issue?
              • 15152
              • 360 Posts
              Max

              Sorry for the delay!

              Haven’t had the chance to use your suggestions yet. Probably next week. The Lightbox was always on the page and worked fine until I added the accordion menu. It’s a real simple menu. I’ve used others in the past, but this one was the easiest I’ve seen.

              You can find it here: http://roshanbh.com.np

              I used Ditto for the menu items (Wayfinder would have worked just as easily). All you have to do is insert either call where your list would go. On sites that have a lot of content I’ve been trying to find a nice way to implement a menu that doesn’t take up a ton of space. I like this accordion version. The list is limited to 10. The last item in each menu is a ’Show All’ that takes you to the category page that paginates all of the items in the folder.

              I’ll let you know next week about getting Lightbox to work with it.

              Below is the chunk I created for the menu - it includes the newsletter subscription, etc.

              <div id="firstpane" class="menu_list"> <!--Code for menu starts here-->
              		<p class="menu_head">articles<br /><span class="subhead">business & marketing</span></p>
              		<div class="menu_body">
              		[[Ditto? &startID=`50` &summarize=`10` &removeChunk=`Comments` &tpl=`journalList2` &paginate=`0` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`0` &tagData=`documentTags`]]
                             <div class="ditto_journalList2"> <h5><a href="Articles">All Articles »</a></h5>
                             <div class="journal_info2" >Chronological Listing</div>
                             </div>
              		</div>
              		<p class="menu_head">News<br /><span class="subhead">what's going on here</span></p>
              		<div class="menu_body">
              			[[Ditto? &startID=`48` &summarize=`10` &removeChunk=`Comments` &tpl=`journalList2` &paginate=`0` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`0` &tagData=`documentTags`]]
                              <div class="ditto_journalList2"><h5><a href="IDNews">All News Items »</a></h5>
                              <div class="journal_info2" >Chronological Listing</div>
                             </div>
              		</div>
              		<p class="menu_head">Blog<br /><span class="subhead">miscellaneous ramblings</p>
              		<div class="menu_body">
                        [[Ditto? &startID=`52` &summarize=`10` &removeChunk=`Comments` &tpl=`journalList2` &paginate=`0` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`0` &tagData=`documentTags`]]
                        <div class="ditto_journalList2"><h5><a href="Blog">All Blog Entries »</a></h5>
                        <div class="journal_info2" >Chronological Listing</div>
                        </div>
                             </div>
              <p class="menu_head">Subscriptions<br /><span class="subhead">RSS News, Newsletter & Social</p>
              		<div class="menu_body">
                       <div class="rss">
              			<a href="feed.rss">RSS Newsfeed Subscription</a>
              		</div>
              				<p>
              	<script type="text/javascript">
              	function validate_email(field,alerttxt)
              	{
              	with (field)
              	{
              	apos=value.indexOf("@")
              	dotpos=value.lastIndexOf(".")
              	if (apos<1||dotpos-apos<2) 
              	  {alert(alerttxt);return false}
              	else {return true}
              	}
              	}
              
              	function validate_form(thisform)
              	{
              	with (thisform)
              	{
              	if (validate_email(email,"The e-mail you typed is not valid. Please try again.")==false)
              	  {email.focus();return false}
              	}
              	}
              	</script>
              	<table>
              	<tr>
              	<td><h5>Newsletter</h5>
                             Please input your name and e-mail to subscribe or unsubscribe our newsletter:</td>
              	</tr><tr>
              	<td><form action="" onsubmit="return validate_form(this);" method="post">
              	First name<br />
              	<input type="text" name="firstname" size="25" maxlength="50"><br />
              	Last name<br />
              	<input type="text" name="lastname" size="25" maxlength="50"><br />
              	e-mail<br />
              	<input type="text" name="email" size="25" maxlength="50"><br />
              	<input type="hidden" name="op" value="set">
              	<input type="radio" name="option" value="subscribe" CHECKED>Subscribe
              	<input type="radio" name="option" value="unsubscribe">unsubscribe   
              	<br /><input type="submit" value="Submit" >
              	</form>
              	</td>
              	</tr>
              	</table></p>
              <br clear="left" />
               <a href="http://twitter.com/jackmcdaniel"><img src="img/twittericon.gif" alt="twitter" border="0" /></a> 
               <a href="http://www.linkedin.com/pub/8/a10/49b"><img src="img/linkedin.gif" alt="linkedin" border="0" /></a>
              </div>
              
                There are no boring projects. Only boring executions. ~ Etzkorn
                www.impress-design.com
                • 23299
                • 1,161 Posts
                Thanks for posting that. I need to take a closer look when I get the time.

                I am in the same zone as you: using jQuery for menus and lightbox galleries.

                After some frustration and lots of experimenting I sort of have a decent solution for an ongoing project. I have a site with a top menu, fancybox gallery, and a scrolling image accordion. All three are powered by jQuery. I found that I could not have all three scripts presented on the same page. I could get two to work but not all three. I landed up removing all of the <head> code from the template and placing it into a chunk. This made the template look cleaner. I then made separate chunks for the <head> code, each with its own combination of jQuery scripts needed for each page system. I then created a new version of the template that was identical to the main template except that it called the different version of the <head> chunk.

                This gives me pretty simple choices for getting the various jQuery scripts to work. I have no idea if this is the proper MODx guru method here? I am still finding my way with MODx and jQuery is very new to me, but this works for me. I think I might look into using TV’s to collect the different <head> chunks (with different jQuery script combinations, but in this case I don’t think it saves much effort over using two very similar templates.

                I love the power of jQuery but some of it is hard to wrap my head around. It also seems you really have to pay attention to changes in the main jQuery Library and the various scripts and plugins employed on a site: sometimes they don’t play nicely together anymore...

                Max
                  • 15152
                  • 360 Posts
                  Max (and anyone else that wants to jump in)
                  I think I have a solution. I found a jquery lightbox that I have plugged in to a page. The accordian menu and the lightbox seem to work. I’d appreciate it if someone else would test it for me. I don’t have access to IE (6 or 7) right now.

                  Go to this page on my site:

                  http://impress-design.com/22

                  I found the lightbox here: http://colorpowered.com/colorbox/. It’s real easy to implement, just forget that in MODx you have format the image paths properly.

                  Let me know !
                  Thanks
                    There are no boring projects. Only boring executions. ~ Etzkorn
                    www.impress-design.com
                    • 26931
                    • 2,314 Posts
                    Hi!

                    the IEs got a little css-offset problem, see the attached screenshots. both scripts seem to work, one time when i clicked on the second image first, the page just got the dark overlay without an image...i couldn’t reproduce this behaviour in IE7 though

                    jan
                      • 15152
                      • 360 Posts
                      Thanks, Jan.
                        There are no boring projects. Only boring executions. ~ Etzkorn
                        www.impress-design.com