We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var panel = $('selector').scotchPanel({ ... }); ... panel.open();
....isn't the jQuery way :-)
How about this?
$('selector').scotchPanel({ ... }); ... $('selector').scotchPanel('open');
....then we can always call the public methods without having to store the panel object at the time of creation.
And this way the object is still chainable, the jquery way :-)
$('selector').scotchPanel({ ... }); ... $('selector').addClass('something').data('whatever',true).scotchPanel('open'); ... $('selector').removeClass('something').data('whatever',false).scotchPanel('close');
You could also expand the number of public methods available like..
$('selector').scotchPanel({ ... }); $('selector').scotchPanel('open'); $('selector').scotchPanel('switch', 'right'); // change panel layout? $('selector').scotchPanel('trigger', '.selector'); // add a new trigger $('selector').scotchPanel('do_something', 'var 1', 'var 2'); // something entirely different?
ps.: Of course we could still store $('selector') in a variable so we don't call it over and over again, but you get the point, I hope.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
....isn't the jQuery way :-)
How about this?
....then we can always call the public methods without having to store the panel object at the time of creation.
And this way the object is still chainable, the jquery way :-)
You could also expand the number of public methods available like..
ps.:
Of course we could still store $('selector') in a variable so we don't call it over and over again, but you get the point, I hope.
The text was updated successfully, but these errors were encountered: