air
air

Reputation: 6264

Get value in jQuery

I have one function which return value in this format:

    li#2.ui-widget-content
    li#6.ui-widget-content
    li#12.ui-widget-content
    li#1.ui-widget-content

Each time I run function I get random value in the above format.

I want to get value after li# in jQuery

Thanks

Upvotes: 0

Views: 166

Answers (1)

ChaosPandion
ChaosPandion

Reputation: 78252

This will return everything past the 3rd character (#).

var value = "li#2.ui-widget-content";
var result = value.substr(3);

alert(result);

substr Function Reference

Upvotes: 7

Related Questions