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...
We are now using Redis for in-memory cache for our Django application (we used the first memcatch The difference in performance is no big, and we're using Redis because the disc dump feature). The problem is that Django cache's performance in my view - terrible, we have a view with 102 cache hits (no miss), and it has 81 ms (only the cash part, which is with the DJBugBug toolbar Is measured). In my opinion - this is a very long time, I know, asking for a question for DB can be 10x more (or 100x) time, but that is also not good with cash performance of that fact. We are running radis (and the first memacatch) on different hosts, connected to the local network with other servers. Is there a way to maximize cache performance in Django? Instead of displaying problem cache, there is a possibility of the number of items to be received for each page 102 Cash calls mean long time lost due to network latency. With full control of the code, you may be able to fix it with m...
to JTable , I follow the row for [row 1] and calculate the values Do: Last Array List & lt; String & gt; Value = new array list & lt; String & gt; (); End end nb = myTable.getRowCount (); Int sum = 0; (Int i = 1; i & lt; nb; i ++) for {string column = value = myTable.getColumnValue (i, columnName); Yoga = Yoga + Integer.parseInt (columnValue); Value list Add (column value); } But I found: java.lang.NumberFormatException: for input string: "java.lang.NumberFormatException.forInputString (unknown source) Java.lang.Integer.parseInt (unknown source) at Java.lang.Integer.parseInt (unknown source) Your table contains at least one empty cell. Here's a suggestion: Try {sum + = integer.parseont (columnValue) );} Hold (Number Format Expection NFE) {// Cell is either empty or not an integer number // Note, method getColumnValue (int i, string name) javax.swing. JTable is not defined for . If you use the subclass of JTable , then there ...
Comments
Post a Comment