Open boye opened 9 years ago
First and foremost, thanks for sharing TinyNav.js with the GitHub community, it's a great plugin!
Since I needed something to format the textNode of the <option> elements I extended tinyNav.js with a replace option. It works as follows:
<option>
replace
$('.nav-filter').tinyNav({ active: 'selected', replace: { regex: /\d{1,3}/, fn: function (nr) { return '(' + nr + ')'; } } });
Basically it's a simple way to modify the content before it's gets injected in the DOM. If you want to...I could do a pull request. Just let me know.
Cheers
First and foremost, thanks for sharing TinyNav.js with the GitHub community, it's a great plugin!
Since I needed something to format the textNode of the
<option>
elements I extended tinyNav.js with areplace
option. It works as follows:Basically it's a simple way to modify the content before it's gets injected in the DOM. If you want to...I could do a pull request. Just let me know.
Cheers