1. #1
    Spokos's Avatar
    Registered
    06/11/03
    Location
    Gent
    Posts
    267
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0

    clndr.js laadt niet?

    Best mogelijk dat dit een wreed noobish vraagske is, maar anyway, I'll give it a go. Ik ben clndr.js voor de eerste keer aan het gebruiken, maar om een of andere reden wilt mijn kalendertemplate niet loaden? Wanneer mijn pagina laadt, zie ik gewoon nummers van datums onder elkaar zonder enige opmaak. 't Ziet er dus helemaal niet uit als een deftige kalender. Nu vraag ik mij af of dit normaal is of ik iets verkeerd doe? Dit is m'n code:

    HTML Code:
    <div class="container">
    <h1>Boek</h1>
    <br>
    <h4>Kies je datum:</h4>
    <div id="kalender"></div>
    </div>
    Code:
    <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js'></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js"></script>
    <script src='https://raw.githubusercontent.com/kylestetz/CLNDR/master/src/clndr.js'></script>
    
    <script type="text/template" id="clndr-template">
    <div class="clndr-controls">
        <div class="clndr-previous-button">&lsaquo;</div>
        <div class="month"><%= month %></div>
        <div class="clndr-next-button">&rsaquo;</div>
    </div>
    <div class="clndr-grid">
        <div class="days-of-the-week">
            <% _.each(daysOfTheWeek, function(day) { %>
            <div class="header-day"><%= day %></div>
            <% }); %>
            <div class="days">
            <% _.each(days, function(day) { %>
            <div class="<%= day.classes %>"><%= day.day %></div>
            <% }); %>
            </div>
        </div>
    </div>
    <div class="clndr-today-button">Today</div>
    </script>
    
    <script>
    $('#kalender').clndr({
    template: $('#clndr-template').html()
    });
    </script>
    no votes  

  2. #2
    Cycloon's Avatar
    Registered
    18/01/04
    Location
    Melle
    Posts
    10,535
    iTrader
    56 (100%)
    Mentioned
    0 Post(s)
    Reputation
    27/102
    Zonder ook maar enige kennis te hebben van clndr denk ik dat je hun stylesheet nog moet toevoegen:

    https://github.com/kylestetz/CLNDR/t...example/styles
    “In terms of how we evaluate schooling, everything is about working by yourself. If you work with someone else, it’s called cheating. Once you get out in the real world, everything you do involves working with other people.”
    PSN: Cycloon - Final Fantasy XIV: A realm reborn character
    no votes  

  3. #3
    Spokos's Avatar
    Registered
    06/11/03
    Location
    Gent
    Posts
    267
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0
    Jup, klopt! Bedankt. M'n html kwam wel niet echt overeen met de css in het voorbeeld. Ik heb dan maar gewoon de html van 't voorbeeld gebruikt. Works fine now.
    no votes  

  4. #4

    Registered
    14/08/10
    Location
    Diest
    Posts
    2,419
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    8/16
    Opmerking: GitHub is geen CDN, gebruik het zo ook niet.
    no votes  

Tags for this Thread

Posting Permissions

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

Log in

Log in