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 am trying to implement the canonical url and to combine with custom route classes. URL-SACAME is something like this: / category-x / article / 123 / category-y / article / 123 I am creating a custom route - the expansion of the class Zend_Controller_Router_Route_Regex and checks that the article is 123 and the correct category-name is included in the URL. If the article is in 123 square-X and the user is reaching square-y, then I want to redirect to the correct URL. But there is no clear possibility to do this directly to the roads. What is the best practice approach here? I often do this in my action controller like something ... // Get / Category-Y / Article / 123 $ $ article- & gt; URL is generated, and it contains / category-x / article / 123 if (this-> --request-> getRequestUri ()! = $ Article-> URL) {return $ this- & gt; ; _helper-> Redirector-> GoToUrl ($ paragraph-> url); } In this example, $ article-> The url will need ...
In anticipation of a live scenario, I am creating my entire site, which has a 500 MHz processor with 256 MB A very large 100 MHz RAM I have loaded my database with 200k + rows of garbage data, trying to test my queries. I have seen - obviously because of this, a large display hit all my FAQ using the index, although some 15+ to join (using all indexes) using MySQL To enable 16MB cache, which brings down the query times to nothing but what results? With a dynamic website, I can not see how the cache can help completely when I allow unique queries such as a search feature. I am also using the eaccelerator for PHP. When I use the COUNT (*) total with multiple code JOIN and WHERE , then 10 + There are other queries. Other queries that only get the same line or two do at the same level when I had only a few lines I also noticed that almost 99% of the CPU in CPU CPU stress during a query Comes. Basically I do not know whether the software is on the fault or too much of the h...
I am trying to write a simple invoicing system. I want to use the Datetime Diff to calculate the cost of each invoice. I have so far: / * In this example $ dayLength and $ ratePerSec is not really the case, but now we use the hypotethical values of 8.0 and 0.0054 Will * / $ date1 = new date time ("Time 1 Form Database", [DateTimeJonof Chase]); $ Date2 = new date time ("Time 2 Form Database", [Datetime Joneof Choice]); $ Diff = $ date2- & gt; Diff ($ date1); $ LenInSec = $ diff- & gt; Format ("% y") * 365 * $ dayLength * 3600 + $ diff- & gt; Format ("% d") * $ dayLength * 3600 + $ diff- & gt; Format ("% H") * 3600 + $ diff- & gt; Format ("% i") * 60 + $ diff- & gt; Format ("% s"); $ Cost = $ lenInSec * $ rate per second; When I try to output cost using $ lenInSec generated from the Deltaime Diff, I actually get weird results. Occasionally, in 1 and 3 out of 1 to 3 times, I get the...
Comments
Post a Comment