class « regex « jQuery Q&A

Home
jQuery Q&A
1.addClass
2.alert
3.array
4.attribute
5.browser
6.callback
7.clone
8.Cookie
9.Date
10.Development
11.document
12.dom
13.element
14.filter
15.Firefox
16.flash
17.format
18.html
19.input
20.internet explorer
21.json
22.mootools
23.page
24.performance
25.regex
26.safari
27.selector
28.setTimeout
29.String
30.table
31.Text
32.trigger
33.URL
34.video
35.xml
jQuery Q&A » regex » class 

1. Get a class name by knowing part of it's name when it's not the only class applied to an element    stackoverflow.com

I'm looking for a way using jquery/javascript to get a class name when I only know part of it and there are more than one classes applied to that element. So if ...

2. JS/Jquery/RegEx - Remove all tags except the ones with classname XYZ    stackoverflow.com


this is driving me nuts ;-) I have a string whith various span tags... I want to remove all span tags except the ones with classname XYZ... The problem is that ...

3. jQuery: replace() class name / regex    stackoverflow.com

I am trying to write line of jquery that finds an input that has a class that begins with "a\d" (the letter a and a number) and replace the number with ...

4. Get part of class name from parent and apply to child JQuery    stackoverflow.com

I have the following HTML:

<tr class="wiring_details_6-48">
    <td colspan="2"> Wire Type:
        <select name="select_wire_6" onchange="Estimate.select_wire( 6, this.value, 0 );">
     ...

5. Match multiple element's classes using RegExp    stackoverflow.com

I assign classes to my target elements, in my jquery plugin, like plugin-prop-value. So elements could have several of the type. Currently i just attr('class').split(' ') then for etc. Now I'm ...

6. jquery selector for multiple classes    stackoverflow.com

I have elements in my DOM with class="LiveVal:variablepart" and i would like to write a JQuery selector that works even if the elements have other classes on tom of the above. ...

7. finding a certain class and returning it    stackoverflow.com

How can I see if an element as a class that consists of only numbers and return its value, ignoring other classes? <div class="some_identifier some_other_class 1548"></div> So running it on the above HTML ...

8. add/remove class: regexp support    forum.jquery.com

version 1.2.6: // internal only, use hasClass("class") has: function( elem, className ) { return jQuery.inArray( className, (elem.className ||elem).toString().split(/\s+/) ) > -1; }very compatible patch: // internal only, use hasClass("class") has: function( elem, className ) { var classes= elem.className || elem; if( classes instanceof RegExp ) return !className.replace( classes, '' ); return jQuery.inArray( className,classes.toString().split(/\s+/) ) > -1; }true way ;-): // internal ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.