We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30086
    • 110 Posts
    I’m not running jQuery yet
    First I have to have this work in my local server
    I imported a sql database file from a live website
    and wanted to have it in my local server
    so, now it’s not working
      • 30086
      • 110 Posts
      anybody knows how can I have this work?
      im trying to have locate now the database
      already changed the config.inc.php don’t know why it’s not working
        • 19741
        • 90 Posts
        Quote from: ottogal at Aug 11, 2010, 11:11 AM

        just run jQuery in no conflict mode
        How this is done?

        Have a look at: http://api.jquery.com/jQuery.noConflict/
          Bye,
          Mithrandir
          • 22427
          • 793 Posts
          Have a look at: http://api.jquery.com/jQuery.noConflict/
          Thank you!
            • 30086
            • 110 Posts
            i’m not yet in jQuery.
            i cant do this unless i can’t find the database in my modx
            i’m asking your help
            please reply
              • 8609
              • 607 Posts
              Quote from: tintincute at Aug 12, 2010, 04:29 AM

              i’m not yet in jQuery.
              i cant do this unless i can’t find the database in my modx
              i’m asking your help
              please reply

              What do you mean by "i cant do this unless i can’t find the database in my modx"? What database are you looking for?
                • 30086
                • 110 Posts
                got stuck with other task. I was able to set up the local server again. And now I’m trying to implement this code to modx. This is supposed to be on my front page. But not really sure how to implement this.

                This is the code I have on the current site:
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
                {{head}}
                <body class="home">
                {{skip-links}}
                <div class="page_margins">
                  <div class="page">
                    {{header}}
                    {{main-nav}}
                    
                    <!-- begin: main content area #main -->
                    <div id="main">
                
                        <!-- begin: #col2 second float column -->
                        <div id="col2">
                            <div id="col2_content" class="clearfix">               
                                {{news-box}}              
                                {{eventsdebox}}
                                {{articles-box}}
                                {{success-box}}
                            </div>
                        </div>
                        <!-- end: #col2 -->
                
                        <!-- begin: #col3 static column -->
                        <div id="col3">
                            <div id="col3_content" class="clearfix">
                                <div id="home">
                                    <div id="home">
                                        <p class="float_left"><a href="[~399~]">Text 1</a></p>
                                    </div>
                                    <div id="mhome">
                                        <p class="float_right"><a href="[~5~]">Text 2</a></p>
                                    </div>
                                </div>
                                {{teaser-box}}
                        </div>
                            <!-- IE column clearing -->
                            <div id="ie_clearing"> </div>
                        </div>                
                        <!-- end: #col3 -->
                    </div>
                    <!-- end: #main -->
                    
                    {{footer}}
                  </div>
                </div>
                <!-- full skiplink functionality in webkit browsers -->
                <script src="assets/templates/ourtemplate/yaml/core/js/webkit-focusfix.js" type="text/javascript"></script>
                </body>
                </html>


                Now I would like to replace the old code to my new code and when I tried to use this one on my home template, it just turned to black.

                Could you please help me how to go forward about this? Thank you:

                <html>
                <head>
                <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
                <title>tintin</title>
                <meta http-equiv="Content-Type" content="text/html; class=MsoNormal; charset=iso-8859-1"/> <style type="text/css"> 
                <style type="text/css">
                
                 
                #tintin{
                position: relative;
                
                
                }
                div
                {
                position: absolute;
                display: none;
                
                font-size:18pt;
                font-weight:bold;
                font-family: Calibri;
                color:#fff;
                }
                
                
                a:link {
                COLOR: #fff;
                text-decoration: none; 
                }
                
                
                .image{
                height:350px;
                width: 855px;}
                
                
                </style>
                <script type="text/javascript"> 
                
                $(document).ready(function () {
                    var count = 0;
                    animate();
                    function animate() {
                        $("div").eq(count).fadeIn(1000); //increase the 400 to make it slower
                       count++;
                        if(count < $("div").length) {
                            setTimeout(animate, 1000);
                        }
                    };
                });
                </script>
                </head>
                
                
                <body>
                <div id="tintin"> </div>
                
                <div class="image" style="background-image:url('pic007s.jpg');">
                
                
                <div style="left:25px; top:180px"><a href="http://www.w3schools.com/HTML/html_links.asp">Text 1</a> </div>
                <div style="left:30px; top:80px">Text 2</div>
                <div style="left:60px; top:30px">Text 3</div>
                
                <div style="right:60px; top:30px">Text 4</div>
                <div style="right:40px; top:80px">Text 5</div>
                <div style="right:20px; top:180px">Text 6</div>
                
                <div style="right:40px; top:250px">Text 7</div>
                <div style="right:75px; top:300px">Text 8</div>
                
                <div style="left:80px; top:300px">Text 9</div>
                <div style="left:50px; top:250px">Text 10</div>
                
                  
                </div>
                </body>
                </html>


                DO I need to install something?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  For one thing, you really should use a doctype. If you don’t, IE for one will drop into what’s called "quirks mode" and its behavior is to say the least unpredictable.

                  http://www.htmlcodetutorial.com/document/_33nDOCTYPE.html
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 30086
                    • 110 Posts
                    you mean this one :

                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Ah. I thought the second code block was the whole template.

                      Anyway, yes, you do have to load the jquery library first, something like
                      <script type="text/javascript" href="path-to-jquery-file"></script>

                      Adding javascript to a MODx template is no different than adding it to a flat HTML page.

                      If you’re working with Evo, you’ll probably need to go to the QuickManager plugin and modify its configuration; it loads its own copy of jquery and can cause conflicts. If you’re going to have the jquery library loaded, then you can disable QM’s loading of the library; it will run quite happily with your version.

                      If you’re using a browser that provides a javascript error console it can be useful in catching errors like this.

                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org