javascript - How to style a "list item > link" in jquery mobile -
i have like:
$("#ofertas_cercanas").append("<ul data-role='listview' id='profile_list_close' style='max-height: 145px; overflow: auto;'>"); (var = 0; < data.ofertas.length; i++) { $("#profile_list_close") .append("<li class='ui-nodisc-icon' data-icon='forward_arrow_merca'><a style='margin-top: 10px; margin-left: 15px; border-style: none; max-height: 50px; font-size: 0.8em; background-color: white !important;' href='#job_loaded_from_json_with_coordinates_to_user_profile_" + + "'>" + "<div id='procesos_title'>" + data.ofertas[j].titulo + "</div>" + "</br>" + data.ofertas[i].empresa + "</br>" + data.ofertas[i].localidad + ", " + data.ofertas[i].provincia + "</a></li>"); } ...
and wondering how css selector point div id procesos_title.
tried with
#user_profile .ui-content, #profile_list_close > li > a#procesos_title{ color: reddish !important; }
thanks in advance
ids stored in browser fast lookup dictionary 1 element per id. reason (and html spec) cannot have duplicate ids when add together dynamic elements.
instead utilize class procesos_title
this:
$("#ofertas_cercanas").append("<ul data-role='listview' id='profile_list_close' style='max-height: 145px; overflow: auto;'>"); (var = 0; < data.ofertas.length; i++) { $("#profile_list_close") .append("<li class='ui-nodisc-icon' data-icon='forward_arrow_merca'><a style='margin-top: 10px; margin-left: 15px; border-style: none; max-height: 50px; font-size: 0.8em; background-color: white !important;' href='#job_loaded_from_json_with_coordinates_to_user_profile_" + + "'>" + "<div class='procesos_title'>" + data.ofertas[j].titulo + "</div>" + "</br>" + data.ofertas[i].empresa + "</br>" + data.ofertas[i].localidad + ", " + data.ofertas[i].provincia + "</a></li>"); }
and reference in css via class with:
#user_profile .ui-content, #profile_list_close > li > a.procesos_title{ color: reddish !important; }
javascript jquery html css
No comments:
Post a Comment