javascript - "JQuery Bottom Content Panel" Load as "hidden" instead of "show" -
I am currently trying to get it:
hidden and instead opened To be prepared, the main.js code is already opened below:
(function ($) {jQuery (document) .ready (function () {Panel.init (); $ (Document) .on ('click', '.tab-controller', function () {panel.togglePanel ();});}); var panel = {invisible: false, show message: blank, hidden message: Free, Animation Duration: 350, Animation Ezing: 'Linear', Init: function () {}, showpanel: function ($ {'Panel-wrapper') ({Bottom: 0}, Panel Animation, Panel Animating ESSING, Function () {panel.isVisible = true; Panel.UpdateTab Message ();});} , hidePanel: function () {$ ('panel-cover'). ({bottom: - (Panel.getAnimationOffset ()), panel.Animationization period, panel.editization, function () {panel.isVisible = false; Panel.updateTabMessage ();})}}, togglepanel: function () {((this .isvial)? This is hyphen: this.showPanel) ();}, updateTabMessage: function () {if (this.isVisible) {$ ('tab-controller. close '). Show (); $ ('. Tab-controller .show') Hide ();} else {$ ('Close Tab-Controller.'). Hiding (); $ ('Show Tab-Controller'). Show (); }}, GetAnimationOffset: function () {return $ ('.panel-content'). Height (); }}}) (JQuery); I'm staring at this for hours and I've gone branded, I think I'm missing something fundamental. What to do with CSS? Thanks
I created the following modifications so that the isisible function determines it Whether or not the panel is opened or closed: -
Hide thePanel () function so that we can give it a flag the flag determines That should animate the panel or "snap" should be closed. This gives us the option to stop immediately without any animation menu. hidePanel: function (snap) {$ ('.panel-wrapper'). Animate ({Bottom: - (Panel.getAnimationOffset ()), (Snap? 0: Panels. Animation Duration), Panel.AnimationIsing, Function () {panel.iscil = False; Panel.UpdateTab Message ();}); } -
init () function is invisible invisible modify the flag and modify "snap" The panel closes if it is appropriate: init: function () {if (! This.isVisible) {this.hidePanel (true); hidePanel () -
TogglePanel () function modified to pass the "snap" flag Code> False (Animation): Toggle panel: function () ((this .ususable)? Hip panel (false): show it. Panels) (); -
unlimited value to false : invisible Is: incorrect, with -
opening the panel, just set isvisible to true >: / div>
Comments
Post a Comment