Reputation: 11
TLDR: How would one add an 'id' attribute to the finish button within jQuery.Steps.js?
When the finish button is called it looks like this within HTML:
<a href="#finish" role="menuitem">Finish</a>
This is what I want it to look like:
<a href="#finish" role="menuitem" id="example1">Finish</a>
Any ideas?
Upvotes: 1
Views: 2069
Reputation: 600
Add the following in your steps
onInit: function (event, currentIndex) {
$('.actions a[href="#finish"]').attr('id', "example1");
},
Upvotes: 0
Reputation: 23
Try this:
onInit :function (event, current) {
$('.actions a[href=\\#finish]').attr('id', 'FinishButton');
}
Upvotes: 0
Reputation: 45
Add this it works
onInit :function (event, current) {
$('.actions a[href=#finish]').attr('id', 'example1');
}
Upvotes: 1
Reputation: 1
You can define a class for this element and choose a selector for that class in below statement to add id named example1 to Finish element.
$('.some_selector').attr('id', 'example1');
Upvotes: 0