L
L
lavezzi12015-10-08 02:09:56
css
lavezzi1, 2015-10-08 02:09:56

How does jquery work?

Hello colleagues.

You need to set the default value for the #preview block, let's say the first item in the drop-down menu (16px). To have this value initially set to the #preview element. How to do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DevMan, 2015-10-08
@lavezzi1

codepen.io/anon/pen/dYRyLP

X
xmoonlight, 2015-10-08
@xmoonlight

$('#preview').css('font-size','16px');

P
profesor08, 2015-10-08
@profesor08

function fix(e, value) {
  e = $(e);

  e.find("option").each(function(id, e) {
    if (e.value == value) {
      e.selected = true;
      retunr;
    }
  });
}

fix("#chooser", "20px");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question