Iladarsda Iladarsda - 1 year ago 125
Javascript Question

jQuery - trim the variable

I have following example:

var VarFull = $('#selectror').attr('href')
.attr('href') = "#tabs1-1"

How can I trim that to
( without

Any suggestions much appreciated.

Answer Source

Use substring:

var VarFull = $('#selectror').attr('href').substring(1);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download