yo.
so what i need is when i click the <a class="btn btn-primary btn-large" id="button">Load Image</a>, it should load the image which is inputted to <input id="text"> to <div id="#area"></div>. Hoping this makes sense.
What I've tried?
Couldn't get it working. Hor can i do that?
so what i need is when i click the <a class="btn btn-primary btn-large" id="button">Load Image</a>, it should load the image which is inputted to <input id="text"> to <div id="#area"></div>. Hoping this makes sense.
What I've tried?
HTML:
<input type="text" id="img" class="form-control" placeholder="Yemeğinizin linki.">
<a class="btn btn-primary btn-large" id="button"name="button">Resmi Önizle</a>
<div id="area">
</div>
<script>
$("button").click(function () {
var imgUrl = $("img").val();
$("#area").html("<img src='" + imgUrl + "' alt='description' />");
});
</script>