javascript - Hiding a variable -


i have javascript list has 3 variables 3 columns within table in e database information being pulled from. 3 id, content , status, when displaying data in list displays content along status number, number determines colour content have done using css, don't want number displayed after content, way of hiding this?

heres of php code pulling in:

public function getlist()     {            $link = $this->connect();         // query entries table , order them based on id descendingly         $query = "select * tbtodolist order status";          $res = mysql_query($query);          $res_array = array();         // fetch entires 1 one         while($row=mysql_fetch_array($res)){             // put query result in php array             $array = array('id' => $row['id'],                            'content' => $row['content'],                            'status'=> $row['status']);  

and here of js // render to-do list view

todo.getview = function (res){     // if list has more 2 entries, grants permission use massive weapon/delete     if(res.length >= 2){         $('#massiveweapon').css('display', 'block');     }     // update list view     (var i=0; i< res.length; i++){ $("<li/>", {"id": res[i].id, "text": res[i].content + res[i].status, "class": 'status-' + res[i].status}).appendto(todo.list);      if(res[i].content.length >= 35){             $('#'+res[i].id).css("height","50px");         }     } }        

thanks help.

in javascript definition of item, setting text res[i].content + res[i].status. if don't want status in text, remove + res[i].status text.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -