Jquery, Pass values from id to another js function

Jquery, Pass values from id to another js function

I want to pass the values from one Jquery Function to another.

Running this function

 $(function() { $('#ProjectWHDate').change(function(){ $('#TaskFechHours').load('disabledtimes.asp?RobotID='?RobotID=1&ProjectWHDate=10/10/2020); }); });

im getting from disabledtimes.asp this result:

'timeFormat': 'H:i', 'minTime': '9:00pm', 'maxTime': '17:00mm', 'showDuration': true, 'step': 15, 'disableTimeRanges':[['10:00', '13:00']]

So Far So Good... But i want to pass this result to another script. This one...

$(function() { $('#ProjectWHDateStartHour<%=rsaddrobots("RobotsID")%>').timepicker({ // Here i want the result to be... // }); });

All i have done so far is get the results in this

<div id="TaskFechHours"></div>

If i make div id=TaskfechHours display:none can i use its values?


Any Ideas???

Thanks in Advance.