Title: toggle css attribute not working right
Last modified: August 21, 2016

---

# toggle css attribute not working right

 *  Resolved [jessibird](https://wordpress.org/support/users/jessibird/)
 * (@jessibird)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/)
 * Hi, I’m generally loving this plugin, but I’m getting problems if I try to add
   a class to a toggle, as in the example here: [https://arconixpc.fogbugz.com/default.asp?W9](https://arconixpc.fogbugz.com/default.asp?W9)
 * Instead of getting a class attribute inserted into the .arconix-toggle-wrap div,
   I’m getting the text `<div class="custom-class">` showing up on the page, above
   the toggle.
 * [http://wordpress.org/extend/plugins/arconix-shortcodes/](http://wordpress.org/extend/plugins/arconix-shortcodes/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [John Gardner](https://wordpress.org/support/users/jgardner03/)
 * (@jgardner03)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676642)
 * Hi Jessibird,
 * I did that by design because I had trouble overriding the existing values when
   it was just another class in a list. Are you having troubles making the CSS customizations
   you’d like? If so, I might be able to help.
 *  Thread Starter [jessibird](https://wordpress.org/support/users/jessibird/)
 * (@jessibird)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676643)
 * Hello John,
 * Thanks so much for responding!
 * What you describe would be alright, if it actually created HTML markup. Instead,
   it’s just displaying it as text. In other words, the HTML characters are encoded.
   At least, they are for the opening div tag; the closing div tag is working properly
   as actual markup.
 * Take a look – I copied the exact code you have on your example page into the 
   text view of my editor on this page: [http://jessibird.net/test](http://jessibird.net/test)
 * I’ve tested and observed this on two sites on different servers now, with different
   but minimal plugins.
 * Thanks,
 * Jessi
 *  Thread Starter [jessibird](https://wordpress.org/support/users/jessibird/)
 * (@jessibird)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676645)
 * Maybe the relevant code is line 554 of includes/shortcodes.php where you use 
   esc_attr on $css_start? I think it’s the esc_attr that is causing the problem.
 *  Plugin Author [John Gardner](https://wordpress.org/support/users/jgardner03/)
 * (@jgardner03)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676648)
 * Yeah, that’s just dumb… I’ll get that fixed asap.
 *  Thread Starter [jessibird](https://wordpress.org/support/users/jessibird/)
 * (@jessibird)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676649)
 * Thanks, John, that’s awesome! Have a lovely weekend.
 *  Plugin Author [John Gardner](https://wordpress.org/support/users/jgardner03/)
 * (@jgardner03)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676651)
 * While I’m in here, I’m going to move the CSS to be inline… that’s how I’ve done
   it on other shortcodes, and I’d prefer to keep things consistent.
 *  Thread Starter [jessibird](https://wordpress.org/support/users/jessibird/)
 * (@jessibird)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676670)
 * Yay, that’s how I like it, too. Thanks for everything, John!
 *  [Stubborn_Facts](https://wordpress.org/support/users/stubborn_facts/)
 * (@stubborn_facts)
 * [13 years ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676825)
 * John,
    I don’t know if you already know this or it’s helpful information, but
 * `<div class="custom-class">`
 * is visible above the toggles in Firefox, but not Chrome or Safari.
 * Is it just me, or is Firefox starting to become a bit of a pain? I’m noticing
   an increasing number of issues cropping up.
 * I look forward to the fix – I have a number of uses in mind for the toggles feature
   that should help site visitors see and use information and really appreciate 
   the way you’ve coded this – it doesn’t constitute a site load burden.
 * Thank you,
    Shelli

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘toggle css attribute not working right’ is closed to new replies.

 * ![](https://ps.w.org/arconix-shortcodes/assets/icon-256x256.jpg?rev=2951512)
 * [Arconix Shortcodes](https://wordpress.org/plugins/arconix-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/arconix-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/arconix-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/arconix-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/arconix-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/arconix-shortcodes/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Stubborn_Facts](https://wordpress.org/support/users/stubborn_facts/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/toggle-css-attribute-not-working-right/#post-3676825)
 * Status: resolved