Comments (10)
I would like to see this feature implemented too. Thanks for the useful plugin!
from sidebar.
Can you please explain me what you want to achieve?
from sidebar.
Hide or show the sidebar without user interaction a Method like showSidebar and hideSidebar. This sidebar is very useful and i need to trigger these actions without user interaction
from sidebar.
By now there isn't such feature. I guess you should think of a trick by yourself.
However I will consider to add a feature like this in the next version of this plugin!
from sidebar.
A quick & dirty solution for who need this too is to hide the opener with css and trigger the click event with jQuery : $("#opener").trigger("click");
Thanks for take the time to answer !
from sidebar.
@sdkcarlos can you please provide me some examples? Like the way you did this trick and when did you call that method?
I am willing to add this options so I am rewriting the plugin, it will be awesome if you'd explain me your situation!
from sidebar.
I mean, for example : I have an asynchronous call (ajax) and it will get some data from the server , when this data is fetched I need to open the sidebar with pure javascript !
We need actually to open the bar ,click on the given selector :
selector.simplerSidebar({opener:'#otherselector'});
I used this plugin in Our Code Editor Free, an android app so in the simple case , a normal initialization worked.
But in other project I needed to trigger the bar when the akax call finished so I simply used :
$("#otherselector").trigger("click");
That did the trick for me , with the actual source Code of your project , a good possible fix to this is add some option like :
selector.simplerSidebar("show");
When executed, check if the plugins has been already initializated on the selector and show the bar, otherwise initalize it.
However this is just a suggestion and the plugin is working very well, with the trigger function the problem is solved (if someone needs the same Feature).
from sidebar.
This sounds a little complicated to me, but I will think of how to implement this feature!
from sidebar.
This is painful using the jquery plugin pattern. And since other patterns I tested lack of the ability to run truly multiple instances, I think that by triggering the click like you did is the best option!
I won't close this issue because I really committed to find the way that can coexist with jquery!
from sidebar.
The only smart way to toggle the animation is by triggering the trigger like @sdkcarlos did!
from sidebar.
Related Issues (19)
- Triggering animation after clicking HOT 3
- Mask over the sidebar HOT 2
- Mask over the sidebar
- Bugs in README options HOT 1
- How to scroll the page when side bar is opened ? HOT 8
- event-driven callback HOT 6
- Keep Scrollbar HOT 25
- link to working examples HOT 3
- init: opened
- any animation in the side panel causes it to close HOT 5
- Multiple sidebars do not hide correctly HOT 1
- 'Readme - Getting Started' needs revision; I followed it and get a blank page. HOT 5
- overflow: initial causes IE's scrollbar to disappear forever HOT 2
- animate and easing bugs? HOT 6
- Triggerless run HOT 1
- prevent page from jumping once the scrollbar disappears and the sidebar opens.
- Resize Issue HOT 2
- jQuery 2.x compatibility HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sidebar.