I am trying to create a jQuery open panel, and plug-ins are all around for this, but let me I do not really get what I want, I'm trying to roll myself using my various examples. Although it works for the most part, there is a bit which does not and why can not I.
(An example page is)
How it works (or it
HTML
javascript
(function ($) {$ .fn. Extend ({CollapsiblePanel: function () {return $ (this) .each (initCollapsiblePanel);}});}); Function int callspible panel (if ($ (this). Child (). Length = = 0) {$ (this) .wrapInner (" ");} $ (this) .Kids (wrap) all ("& lt; div class = 'Cpa $ ("Nelcontent '& gt; & lt; / div & gt;"); $ ("& lt; div class =' cpanelTitle '" & gt; "$ (this) .attr (" title "
css
# container {width: 300px; Height: 300px; }. CollapsiblePanel {width: 100%; }. CpanelTitle {Status: Relative; Width: 100%; Cursor: indicator; Cursor: hand; }. Cpanel toggle {status: absolute; Top: 0px; Correct: 0px; Font-style: italic; } Then it takes a div with square collapsiblePanel and creates various nested divs. The header has a title and some toggle text that will be 'more' or 'off' depending on whether the content panel is extended or concise or not.
That which does not work is bit
if ($ (".cpanelcontent", $ (this) .Parent ()). (": Hidden" )) { The toggleCollapsiblePanel () function has a div toggle, it seems that I am selecting the content div right, but to find out whether it is hidden or not (hence I can change the text of cPanelToggleDiv) always back in false form - which indicates that I'm not just doing it correctly.
I tried and saw that there is a console call (in the example page of the above link), but it can not be seen right now.
hide you Status should be checked in the slideToggle callback method. Unless the slide animation is complete, you can not say whether it is hidden or not
toggle the function CollapsiblePanel ($. ($.) {$ (".cpanelcontent", $ (this) .Parent ()) Slide Toggle (function () {if ($ (this) .is (": hidden")) (This) .html ('more');} and {$ (this) .html ('off');}})}}
Popular posts from this blog
I have developed an extension which works up to 1.6 on Magren (I'm trying Enterprise Edition, And I think the community is the same problem, because it is the same code). In my install script, I see the $ installer-> gt; CreateEntityTables ($ this- & gt; getTable ('alphanum / info')); The installation is done until it is not in the _text unit table. It crashed there! It turns out that when I log in to SQL and run it via PHPmyadmin, then this error is: Blob / Text column 'value' is used without the key 'key' . I saw the code there, and this is what is trying to create an index on the value column: -> addIndex ($ this- & gt; getIdxName ($ eavTableName, array ( 'attribute_id array (' attribute_id ',' value ')) - & gt; addIndex ($ this- & gt; getIdxName ($ eavTableName, array (' entity_type_id ' , 'Value')), array ('entity_type_id', 'value')) If there is no if statement is n...
If I have any results from the Active Records, then I have an array of hashes, if I have a reliable load, then every Each organization hash in record hash has a nested hash of its associated records My question is, is there a quick rail system that allows you to merge these nested hashes into a hash per record? An analogy will be changing the records table rows Another resemblance will be converted into a hash at one level of nested hashes. approach 1: select them in the section Include class user has_one: profile end is for square profile: user # street 1, street 2, city etc. end profile = profile.junks (user :). Selection ("User. *, Profile. *") All profiles. First.login Approach 2: Use delegation for class profiles : User # Street 1, Road 2, City etc. Representative: Name ,: name =,: email,: email = ,: from = to & gt; : End of user
I am making an XNA game and I am calling the following updates 2 to 20 times the code. I tried googling and it seems that it is half slow, so I thought I was asking what kind of fast way to compare the type? code: Public modifier for this [type type] {for (int i = 0; i & lt; this.Qount; i ++) {if ( It [I.] Type GETType () ==) {Please return this [ii]; }} New NotImplementedException Throw ("Fix It"); } Set {for (int i = 0; i & lt; this.Qount; i ++) {if (this [i]. Type GetType () ==) {this [i] = value; }} If (System. Diagnostics.Debugor.ISAcredited) system. Diagnostics. Debugger. Break (); }} This code is in the modifier collection section which comes from a list. The modifier is a part of the particle engine. In addition, my game is not in a situation where I can actually do this test, so I can not test it, but should it work right? I read something about runtime typhanies, which is fast, should I use it? Thanks a lot! Edit: What I'm aiming to do ...
Comments
Post a Comment