8

jQuery plugin to allow name / value properties in & ldquo; class & rdquo...

 3 years ago
source link: https://www.codesd.com/item/jquery-plugin-to-allow-name-value-properties-in-class-attribute.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

jQuery plugin to allow name / value properties in & ldquo; class & rdquo; attribute?

advertisements

I have a bad cold. I was awake late last night, or sort-of awake, and I was just looking through Stackoverflow questions. I came across mention of a jQuery plugin (or maybe it was native jQuery) that allowed named properties to be coded into "class" strings and then extracted:

<span id='mySpan' class='something {toggle: checkbox2, toggleClass: hidden}'>hi mom</span>

The plugin would parse that JSON-like expression out of the "class" string. Now that seems like some really useful functionality; in fact I have implemented a variation of that idea myself and use it heavily for driving unobtrusive behavior binding. It'd also be really nice for validation.

The problem is that though I've been searching for a long time this morning, I can't find anything about this plugin. It's not impossible that the whole thing was a fever-induced hallucination. Any help would be appreciated.


http://plugins.jquery.com/project/metadata

Tags jquery

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK