F
F
ferles2018-05-28 20:42:13
JavaScript
ferles, 2018-05-28 20:42:13

How to make live content change?

Hello everyone, how to make a live content update? For example, I write in intupe 200px changes in css height to 200px and the text changes below
https://jsfiddle.net/Lsrtre50/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-05-28
@webinar

There are events in js, we cling to the change event in the input ( https://api.jquery.com/change/ ) and change the css ( https://api.jquery.com/css/ )
Example:

$('#some').on('change',function(){
    var color = $(this).val();
    $('#mydiv-color').css({
             color: color
     });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question