javascript - .append value of input text to <canvas> isnt displaying the output of .append('<p>' + value + '</p>') -


i have jsfiddle here: https://jsfiddle.net/gemcodedigitalmarketing/zn5ylwh3/

what want text in customtext input appended canvas. though unsure why not working.

it works when tried yesterday append td , tr table. maybe because canvas needs different way of adding text?

not sure... either way apprecaite help.

$('#addtext').click(function() {     var value = $('#customtext').val();     $('canvas').append('<p>' + value + '</p>'); }); 

this jquery @ bottom of page

<div class="assets"> <h3>assets</h3> <div class="text">     <h4>text</h4>     <input id="customtext" type="text">     <button id="addtext" class="btn btn-default">add text</button>     <p></p> </div> <div class="image">     <h4>images</h4>     <ul class="list-unstyled">         <!-- list of images here -->         <!-- <li><img src="images/sample.jpeg" class="img-rounded" /></li> -->     </ul> </div> <!-- canvas --> <div class="canvas col-sm-8 col-md-8 col-lg-8">     <div class="block">         <!-- add images , texts here -->     </div> </div> 

this relevant html.

hope gives guys enough go on...

in case canvas not element class.

this fiddle:

<!-- canvas --> <div class="canvas col-sm-8 col-md-8 col-lg-8">     <div class="block">         <!-- add images , texts here -->     </div> </div> 

so have use in selector as:

$('.canvas') 

don't forget dot.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -