From: Ricardo <ricardob...@gmail.com>
Date: Wed, 15 Apr 2009 23:52:08 -0700 (PDT)
Local: Thurs, Apr 16 2009 2:52 am
Subject: Re: extracting one class out of a few
Hi,
I tried to answer directly but your e-mail rejected it as spam.
We should move this topic to the jquery-en group or continue it
$('[class*='+options.cssprefix+'-]').each(function(){
//parse the object string, faster than eval
var sx = this.className.replace(/,\s+/, ',').match(/sx-\w+(\s+)?
$.each(sx, function(index, val){
console.log( effects );
});
It should log in the firebug console an object which contains all the
effects for a certain element, each with it's options object. It allows either the "sx-shake {option:'something'}" or "sx-shake{option:something}" format in the class attribute. cheers,
On 11 abr, 16:20, Gilles <gil...@netxtra.net> wrote:
> I am getting closer, changing the selector from:
> [class^='+options.cssprefix+'-]
> to
> [class*='+options.cssprefix+'-]
> solved the problem of not retrievingclassattribute with multipleclassname.
> After I use a regex to extract eachclassthat is related to the
> sx-[^\s]+ ?{.*}|sx-[^\s]+
> that works fine in The Regex Coach for the follwoing example:
> red sx-dialog {var: 'val'} sx-draggable black
> But it doesn't work (or I dont use it properly) somehow in the code:
> // sxclassdetector regex ( sx-[^\s]+ ?{.*}|sx-[^\s]
> // scriptless elements?
> // get all classes
> if (classes) $.each(classes, function(i){ alert(classes[i]); });
> That would only return this format sx-foo {var:val} also the first
> On Apr 10, 4:59 pm, Ricardo <ricardob...@gmail.com> wrote:
> > I don't have Firebug here so can't test anything and didn't bother to
> > You could try eliminating the whitespace between the mainclassand
> > <div id="greenbox"class="green sx-shake{event: 'dblclick'}
> > $('[className*="sx-shake"]').each(function(){
> > });
> > Thisclass-gathering process could certainly be streamlined into a
> > On Apr 9, 10:05 am, Gilles <gil...@netxtra.net> wrote:
> > > Hi,
> > > I am still working on my plugin that this group helped me debug in the
> > > Basically my script uses the HTMLclassattribute in order to set
> > > I got it all working now, added event support, delay support, effects
> > > The issue I have is if I want to have multipleclass, some that might
> > > <divclass="foobox sx-fold { sxFxSpeed: 500; }"> // where foobox need
> > > And some I want to be able to have more thanonespecialclassand set
> > > <divclass="foobox sx-draggable { options} sx-resizable {options}"> //
> > > To be honest I have no idea on how to go and do that, I think the
> > > But the problem is as soon as I introduce an otherclassthe plugin
> > > The plugin in action:http://codeserenity.com/jquery/scriptless/demoX4.html
> > > If anyone could point me in the right direction that would be lovely
> > > Thanks in advance. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||