0

How can target this appended item in a code when working with jquery?

target: +item.Gender+

Appended items:

 $('#myListView').append('<li class="ui-nodisc-icon" data-icon="listIcon" >
<a href="" data-     key='+item.randomPostId+'><img class="feedImage" 
src='+item.Pic+'></img><p><strong>'+item.Name+", 
"+item.Gender+'</p></strong>'

To be added in this line of code where it says item.Gender:

$('#myListView li[item.Gender="female"]').hide();
user3356128
  • 67
  • 2
  • 13
  • possible duplicate of [How to use javascript variables in jquery selectors](http://stackoverflow.com/questions/5891840/how-to-use-javascript-variables-in-jquery-selectors) – isherwood Oct 23 '14 at 18:04
  • $("#myListView li:contains('female')") - http://api.jquery.com/contains-selector/ – ezanker Oct 23 '14 at 18:30

0 Answers0