Possible Duplicate:
How to get the attributes of a HTML element using JQuery?
I have a piece of JS and I need to read property ‘value’ from a div.
I do this:
$('#calendar_event_path')
I get this as and answer:
[<div id="calendar_event_path" value="company_events_index"></div>]
How can I get “company_events_index” value from the div?
use data-value attribute in your html
the in jQuery fetch its value using data()