Link to home
Start Free TrialLog in
Avatar of Brian Coughter
Brian CoughterFlag for United States of America

asked on

Dynamically changing javascript code

I have a <div> that contains a date:

<div id="editDateDiv">10/20/16</div>

Open in new window


I want to grab that date and update the date on line 5 of the following jQuery code upon clicking a <td>:

$("#addNew").on("mouseup", function() {
     $(this).css("background", "white");
     $(this).css("color", "#008bab");
     $("#editDateDiv").html("Add New...");
     $("#currentAppts").load("calendar_appNew.cfm?appDate=10/12/2016");
});

Open in new window


How can I accomplish this?
ASKER CERTIFIED SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brian Coughter

ASKER

Excellent.  I was way over thinking that.  Thank you!