Issue with Dynamically assign value to element attribute of bootstrap tour step. #558

Open
dhawalb opened this Issue Jun 21, 2016 · 0 comments

Projects

None yet

1 participant

@dhawalb
dhawalb commented Jun 21, 2016

// tour for Calendar page
var tour = new Tour({
duration: "5000",
backdrop: true,
smartPlacement: false,
backdropContainer: 'body',
backdropPadding: 0,
orphan: false,
autoscroll: true,
animation: true,
debug: true,
storage: false,
template: "

« Prev|Pause|Next »
End tour
",

steps: [
{       
    //step-0
    element: "#AddNewGoal",
    title: "Create Goal",
    content: "Create new goal by click on this button",
    placement: 'left',
    onNext: function () {
        $("#AddNewGoal").click();
    },
    template: "<div class='popover tour'><div class='arrow'></div><h3 class='popover-title'></h3><div class='popover-content'></div><div class='popover-navigation'><button class='btn btn-sm btn-default btn-success' data-role='prev'>« Prev</button><span data-role='separator'>|</span><button class='btn btn-sm btn-default btn-warning' data-role='pause-resume' data-pause-text='Pause' data-resume-text='Resume'>Pause</button><span data-role='separator'>|</span><button class='btn btn-sm btn-default btn-success' data-role='next'>Next »</button></div></div>",  
},
{
    //step-1: Goal is created
    element: '#markCompleteGoalCalendarBT_' + $("#goalId").val(), // here #goalId is the hidden field on html document and i got this value in onShow method but "could not assign to element attribute"                      
    title: "Calendar",
    content: "New goal is created",
    placement: "top",        
    delay: 1500,
    onShow: function () {            
        alert("Hidden field value : " + $("#goalId").val());            
    },
},    
],    

});

In above code i got the value of golaId. I need to assign this value to "element" attribute. please help me out this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment