I’m trying to get the value of a SPAN when user change the active header element and also trigger a $.ajax call. I have this code: http://pastebin.com/rxQRSADQ and the value I get on change event is the value contained in the SPAN with class: selected-center-open-ticket-label but I just need the number “1” and not the entire value meaning “Ticket: 1”. Can any help me?
Share
If it is consistently “Ticket: ” then you can use
substr(8).EDIT:
Demo: http://jsfiddle.net/SO_AMK/6dkh6/
jQuery:
HTML: