textarea + jquery proble

I made some scripts in JS and connected it to html. These two pieces of code are the same, but for textarea “name” works and for textarea “about” don’t. Please help me! HTML (it isn’t the whole document): <div> Назва: <textarea type=”text” class=”form-control” class=”name” id=”name”></textarea> <span class=”namme”></span> </div> <div> Опис товару: <textarea type=”text” class=”form-control” class=’about’…

jquery select all inputs with class gives wrong results?

I am trying to read all inputs of class form-elementNameInput after iterating over: <li class=”liClass”><div class=”containerClass”> There are 2 of them (text1 and text2) For some reason I am getting wrong results from one of the buttons, I am not sure why? I also tried $(this).first(“.form-elementNameInput”).text(); full code: function readInputText(){ var elementText; $(‘li.liClass>div.containerClass’).each(function(){ elementText =…

Why jquery ajax post request get error in yii2?

js: $.ajax({ url: ‘/site/updateuserdata’, method: ‘POST’, //async: true, //cache:false, data: { ‘type’: ‘sort’ //val: val //csrfParam: csrfToken }, dataType: ‘text’, error: function(jqXHR, textStatus, errorThrown) { alert(‘error by ajax’); }, success: function(data, status, jqXHR) { alert(‘success by ajax’); } }); Controller: public function behaviors() { return [ ‘access’ => [ ‘class’ => AccessControl::className(), ‘rules’ => […