newTextBoxDiv.after().html('<div id="hoteldiv' + counter + '">'+'<input type="text" name="tripdetails[0][hoteldetails][' + counter +
'][name]" id="textbox' + counter + '" value="" >'+
'<input type="text" name="tripdetails[0][hoteldetails][' + counter +
'][number]" id="textbox' + counter + '" value="" >'+
'<input type="text" name="tripdetails[0][hoteldetails][' + counter +
'][address]" id="textbox' + counter + '" value="" >'+'<br><br>'+
'<input type="text" name="tripdetails[0][hoteldetails][0][contact][' + counter +
'][name]" id="textbox' + counter + '" value="" >'+
'<input type="text" name="tripdetails[0][hoteldetails][0][contact][' + counter +
'][number]" id="textbox' + counter + '" value="" >'+'</div>'
+'<input type=button value="Add Con" id="addcon' + counter + '">'+
'<input type=button value="Remove con" id="removecon' + counter + '">');
I am not getting value of addcon1 or not getting value click on addcon1
$("#addcon1").click(function () {
alert("demo");
});
ramsiva 0 Junior Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
ramsiva 0 Junior Poster
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
ihelpyou 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.