Giter VIP home page Giter VIP logo

mzaila / jquery.graspschedule.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tak0002/jquery.graspschedule.js

0.0 1.0 0.0 361 KB

jQuery graspSchedule.js is a simple jQuery calendar plugin used to visualize complex schedules & events, a little similar to the timeline or event calendar.

Home Page: http://tak0002.github.io/jquery.graspSchedule.js/

License: MIT License

HTML 30.50% JavaScript 58.76% CSS 10.74%

jquery.graspschedule.js's Introduction

jquery.graspSchedule.js

jQuery graspSchedule.js is a simple jQuery calendar plugin used to visualize complex schedules & events loading from JSON data, a little similar to the timeline or event calendar. You can use it for Life-log application or webpage for time schedule.

Demo

See http://tak0002.github.io/jquery.graspSchedule.js/

How to use

Load jQuery and this plugin.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jquery.graspSchedule.js"></script>

Create your custom schedules & events. The data structure should be like this:

var schedules = [ //"schedules" is list for events which have start and end.
    {
        end: "2014/05/10 3:00",
        start: "2014/05/10 1:40",
        title: "Meeting A"
    },
    {
        end: "2014/05/10 2:41",
        start: "2014/05/10 2:30",
        title: "Conference B <br>", //You can use html tags
        css:{backgroundColor:"#f39c12",height:"100px"}
        //You can use most of CSS properties.But only pixel is allow for height.
    }
];

Create an empty container element for the plugin.

<div id="schedule"></div>

Initialize the plugin.

$('#schedule').graspSchedule({
    schedules:schedules,
    events:events
});

Add custom CSS to style the schedules & events.

.schedule{
    position: absolute; 
    width: 400px;
    background-color: #c0392b;
    border: #ecf0f1 solid 1px;
    padding: 3px;
}
.event{
    position: absolute;
    margin-left: 40px;
    width: 350px;
    background-color: #2980b9;
    padding: 3px;
}

Available Options.

$('#schedule').graspSchedule({
    schedules:schedules,
    events:events,
    options:{ // You can change default setting. Not require.
        classnames: { //If you use this plugin many time in a page, you have to change these.
            schedule: "schedule",
            event: "event",
            time: "time"
        },
        css:{
            event:{
                height:"50px"
            },
            schedule:{
                height:"70px"
            },
            zIndexStart:0,
            marginTop:"0px",
            marginLeft:"0px",
        },
        time:true,//show time on left side
        insideTime:true,//show time inside
        timeFormat:'yyyy/MM/dd(ddd)HH:mm',
        daysFormat:['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
    }
}

License

The MIT License (MIT)

jquery.graspschedule.js's People

Contributors

tak0002 avatar cybernet avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.