Reputation: 1276
When I add this code to my application.js it doesn't work properly. I displays 2 more 'custom_text' button and it keeps there the original 'back' button.
$(document).foundation()
.foundation('topbar', {
index : 0,
stickyClass : 'sticky',
custom_back_text: true,
back_text: 'custom_text',
init : true
});
How could be that fixed?
Upvotes: 2
Views: 2636
Reputation: 61
Foundation Topbar now supports data-options, eg.
<nav class="top-bar" data-section data-options="back_text: 'custom_text'">
Upvotes: 6
Reputation: 1345
The problem is that you are initializing two times the foundation script. You can fix it in this way:
$(document).foundation('topbar', {
index : 0,
stickyClass : 'sticky',
custom_back_text: true,
back_text: 'custom_text',
init : true
});
Upvotes: 0