javascript - dynamically changing custom html values using jquery -
<div data-react-class="duration" data-react-props="{"startdate":"","enddate":""}">
i have in html. how can change startdate
, enddate
values in data-react-props
using jquery?
you can use jquery data selectors
$("div[data-react-class='duration']").attr("data-react-props","{'startdate':'12-12-2017', 'enddate':'01-01-2018'}");
Comments
Post a Comment