Fiddle: http://jsfiddle.net/xpvt214o/276767/
I want to get appended inputs' values. But When I try to
$(".isyeri-aralik-btn").on("click",function () {
console.log("clicked");
});
It is not working. I think newly added inputs and buttons are not HTML DOM element.
How can I get min max values from button related to that button?
--
$("#isyeri-aralik").on("click",function () {
$(' <div class="form-group row" >\n' +
' <div class="col-md-3">\n' +
' <input type="text" class="form-control isyeri-min" placeholder="min tl" onkeypress="return isNumberKey(event,this)">\n' +
' </div>\n' +
' <div class="col-md-3">\n' +
' <input type="text" class="form-control isyeri-max" placeholder="max tl" onkeypress="return isNumberKey(event,this)">\n' +
' </div>\n' +
' <div class="col-md-3">\n' +
' <input type="text" class="form-control isyeri-indirim-orani" placeholder="indirim oranı" onkeypress="return isNumberKey(event,this)">\n' +
' </div>\n' +
' <div class="col-md-3">\n' +
' <span class="btn btn-block btn-success isyeri-aralik-btn">Save</span>\n' +
' </div>\n' +
'</div>').appendTo($("#isyeri-aralik-container"));
});
$(".isyeri-aralik-btn").on("click",function () {
/*Get
isyeri-min,
isyeri-max,
isyeri-indirim-orani's
value when click save button of new appended div */
});