-
Notifications
You must be signed in to change notification settings - Fork 112
Example for more than two nav buttons #6
Comments
easy: 2012/10/17 Eric Schoffstall [email protected]
|
I hacked together a mod to support having two navs, stp-nav on the left and stp-nav2 on the right. It's not pretty but it works, let me know if anyone wants it. |
Hello Jordan, would be good if you can share the code, as i looking actually for this. Thanks Sebastian |
So I've made a lot of changes to my code since I made this modification, but I will try and strip out the parts that I modified just for the second menu. It's ugly but it works:
If you want the three line button instead of text add the "icon" class as well.
I added this in my own css file. I modified a lot of the css classes since it was conflicting with bootstrap. Also I gave my right menu a grey background:
Somewhere in your js $(document).ready, add this:
in sidetap.css, add these classes. Note that for .sidetap.nav-showing I just added the .sidetap.nav2-showing selector, same with .stp-content-panel and .stp-nav2.panel (they already exist I just added more selectors):
In sidetap.js:
In SidetapStandard.prototype.set_up_observers, do the same:
Add a new function set_window_size2:
I modified the toggle_nav function, here is the complete function:
Then added a new toggle_nav2 function:
Add a new nav2_toggle_complete function:
Add a new set_nav2_showing function:
Add a new set_nav2_hiding function:
Then there's all the iOS stuff:
I used set_window_size_4 and set_window_size3 since set_window_size_2 was already being used.
Add a new function set_window_size3:
Add a new function set_window_size_4:
There's a lot of duplicate code stink here, I admit it would have probably been easier just to do this from scratch rather than modify sidetap so extensively. |
There is no example for how to do more than a left and right set of nav buttons. What if I want two buttons on the right?
The text was updated successfully, but these errors were encountered: