We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30086
    • 110 Posts
    Quote from: bunk58 at Aug 10, 2010, 06:45 AM

    In what way, specifically?
    MODx already uses jQuery in the ManagerManager & QuickManager plugins, also many snippets also use it, so yes it’s possible.

    I would like to add in the page something like this:
    http://www.ibsolution.de/irj/portal//dsag_2010
    if you go to the bottom of the page, there are 3 clickable tabs.
    And I would like to have the same in my site.
    The problem is I don’t know how,
    I was advised it could be done by jQuery but not sure if Modx is accepting this.
    And if yes, don’t know where to start
      • 4310
      • 2,310 Posts
      This is not a definitive example, just something to get you started.
      Add this to the <head> section of your template along with a link to a copy of jQuery :
      <script type="text/javascript">
      $(document).ready(function() {
      	$('.tabs a').click(function(){
      		switch_tabs($(this));
      	});
      	switch_tabs($('.defaulttab'));
      });
       
      function switch_tabs(obj)
      {
      	$('.tab-content').hide();
      	$('.tabs a').removeClass("selected");
      	var id = obj.attr("rel");
       
      	$('#'+id).show();
      	obj.addClass("selected");
      }
      		</script>
      

      Your html should look something like this :
      <ul class="tabs">
      <li><a class="defaulttab" rel="tabs1" href="[~[*id*]~]#one">Tab One</a></li>
      <li><a rel="tabs2" href="[~[*id*]~]#two">Tab Two</a></li>
      <li><a rel="tabs3" href="[~[*id*]~]#three">Tab Three</a></li>
      <li><a rel="tabs4" href="[~[*id*]~]#four">Tab Four</a></li>
      </ul>
      <div id="tabs1" class="tab-content">
      
      <a name="one" id="one"></a>
      
      /* your content here */
      
      </div>
      <div id="tabs2" class="tab-content">
      <a name="two" id="two"></a>
      
      /* your content here */
      
      </div>
      <div id="tabs3" class="tab-content">
      <a name="three" id="three"></a>
      
      /* your content here */
      
      </div>
      <div id="tabs4" class="tab-content">
      <a name="four" id="four"></a>
      
      /* your content here */
      
      </div>
      

      The anchors are in there to stop the page jumping to the top when you click a tab.
        • 30086
        • 110 Posts
        This is great thanks so much bunk58. But first I have to figure out how can I have the live site work in my local server. So that I can try this.
        Now I’m having problems with my login after I import the sql database text file:
        If you can see it here:
        http://s197.photobucket.com/albums/aa253/tintingerri/Test/?action=view&current=sqlfoto.png
        The database is already been created.
        Now if I go to the localhost/learningModx/manager, and if I typed my username and password during the set-up it says that it’s incorrect.

        What I also did, i changed the name of the db in the config.inc.php
        which can be found here : which can be found: htdocs\learningModx\manager\includes
        i change the dbname from "modx" to "mydb". now why is the password not working anymore if logged in the manager?
        Did I do it right?
          • 4310
          • 2,310 Posts
          Well, for a start your localhost DB seems to be named wikima4com, not mydb.
          Correct that in the manager/includes/config.inc.php file and see what happens next wink
            • 12147
            • 182 Posts
            Newish question:

            Is it non-problematic to replace the version of jQuery in /assets/js/... from 1.3.2 to the latest version? Will it adversely affect any of the add-ons in Evo 1.0.4?

              • 26951
              • 41 Posts
              I use it extensively - as another poster said don’t mix mooltools into it should be fine.
                • 12147
                • 182 Posts
                Thanks - are any of the Evo add-ons using MooTools, or would that be with other stuff I might add?
                  • 33238
                  • 388 Posts
                  man that depends what do you need exactly!
                  and no mootools!!! jQuery grin grin grin
                    --
                    ysanmiguel.com
                    • 30086
                    • 110 Posts
                    Quote from: bunk58 at Aug 11, 2010, 09:53 AM

                    Well, for a start your localhost DB seems to be named wikima4com, not mydb.
                    Correct that in the manager/includes/config.inc.php file and see what happens next wink

                    hi bunk58 I already changed it. Then I tried to log in again & i can’t logged in
                    Is the path correct?

                    This is what I did...
                    and then I opened the http://localhost/learningMODx/manager/
                    I got the log in page
                    but I can’t seem to logged in using my username and password
                      • 22427
                      • 793 Posts
                      just run jQuery in no conflict mode
                      How this is done?