Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_style: present alternate stylesheets with a style switcher
Stef,
Love this plugin, but can’t seem to make it work…
I have this in the head:
<txp:smd_style sheets="hide,display" />
<txp:smd_styleswitch wraptag="" />
And this in the body:
<ul class="smd_switcher"></ul>
There is also a link to jquery (v1.3.2) in the head
But <ul class="smd_switcher"></ul> gives nothing. No list…
I am using PHP5 and Textpattern · 4.2.0.
Any ideas?
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
Re: smd_style: present alternate stylesheets with a style switcher
Kjeld wrote:
Love this plugin, but can’t seem to make it work…
Ah, yeah. There’s a small issue with the plugin under jQuery 1.3+. Essentially I was a bit of a tool when I wrote it and used the deprecated ‘@’ syntax in my selectors.
Bottom line: you should be able to fix the plugin by searching for ‘@’ symbols in the code on lines that start with jQuery and removing them. There are only 2 lines you need to change (lines 182 and 222); there are only 4 symbols you need to remove in total.
That should get you going. Failing that, I do have a new version written that I could let you have which is a bit tidier and adds some neat features for class-level (CSS) switching. Last time I checked there was one tiny bug that has thus far prevented me from releasing it publicly but if you’re not using class switching it’ll work fine. Drop me an e-mail if you’d like the new version (btw, my e-mail address has changed, so please use the forum e-mail link or my site’s contact form).
Hope that helps.
Last edited by Bloke (2010-05-17 08:16:41)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_style: present alternate stylesheets with a style switcher
Thanks, Stef. Removing the ‘@’ symbols didn’t fix the problem, I am afraid. I will send you a message.
Last edited by Kjeld (2010-05-18 08:28:08)
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
Re: smd_style: present alternate stylesheets with a style switcher
Any news when the new version will be released?
Offline