0

Can someone tell me how to add new Timeline Cells for this Plugin

https://github.com/v-v-vishnevskiy/timeslider

Demo http://v-v-vishnevskiy.github.io/timeslider/demo/demo.html

JsFiddle: https://jsfiddle.net/3mn9ugc7/

  //new initial
    $('#slider123').TimeSlider({
                        init_cells: [
                            {'_id': 'c1', 'start': '0', 'stop': 60*5*999},
                            {'_id': 'c2', 'start': 60*5*1000, 'stop': 60*5*1000*2}

                        ],
                        start_timestamp:  2 * 1000,
                        current_timestamp: (new Date()).getTime(),
                        //distance_between_gtitle: 100,
                        ruler_enable_move:1,
                        hours_per_ruler:1,
                        update_interval: 1000

                    });
    //add new??
    $('#slider123').TimeSlider({
                        init_cells: [
                            {'_id': 'c3', 'start': 60*10*1000, 'stop': 60*7*1000*2}
                        ],


                    });

1 Answer 1

1

You can add a cell by doing: $("#slider123").TimeSlider("add", cell);

But there are many actions you can do including adding, toggling, editing, removing, removing all cells and shifting the where the time slider starts.

Using "add", "toggle", "edit", "remove", "remove_all" and "new_start_timestamp" respectively. Most take a cell but remove just takes a cell id.

Sign up to request clarification or add additional context in comments.

1 Comment

Great Man!!! Works $("#slider123").TimeSlider("add", {'_id': 'c3', 'start': 60*12*1000, 'stop': 60*20*1000*2} );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.