How to get a return value in a jquery function for a dynamic div?
Hi I wonder how I can get a return value from a JavaScript function to a jQuery function. I have dynamic divs that creates each time I push a button and I want to retrieve the new div ID in my jQuery function sow I can get my date pick to drop down.
javascript function to retrieve the new div ID
function currentCustomerDivName()
{
return "customerDiv" + currentCustomerId();
}
My jQuery function
$(document).ready(function()
{
$( "#start_date" ).datepicker();
$( "#end_date" ).datepicker();
$( "#dead_line" ).datepicker();
});
the start_date, end_date and dead_line are static divs that works. The datepicker() calls my calendar.