I have a situation like the one below:

```js
var value = document.getElementById("value").value;
if (value = 'a') {
  ('.setting').append('<input type="text" name="name" placeholder="carname">');
}
elseif(value = 'b') {
  ('.setting').append('<input type="text" name="name" placeholder="fruitname">');
}

$(document).ready(function() {
  $("input[name=name]").keyup(function() {
    alert("The text has been changed.");
  });
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="text" name="username" placeholder="your name">
<select id="value"></select>
<div class="setting"></div>
```

The problem I have is that when I change the input the alert does not trigger. Does anyone know were am I messing up?