jquery - How do i alert flot chart label -
var str = $("#placeholder > .ticklabels > .xaxis > .ticklabel").html(); alert(str); <div style="font-size:smaller" class="ticklabels"><div style="color:#545454" class="xaxis x1axis"> <div style="position:absolute;text-align:center;left:-24px;top:60px;width:57px" class="ticklabel">jan</div> </div> month name generated dynamicallly. code showing null. way alert name of month tat in label of line chart.
there's no .ticklabels element beneath placeholder, , other styles, while exist, deprecated. hierarchy should go this:
#placeholder > .flot-x-axis > .flot-tick-label note match x-axis tick labels, yet .html() uses first matched element.
Comments
Post a Comment