jquery - find a specific id within a html dl -


i want match value (html) of dd tag against variable. example, if id of dd tag equal id1 need match value of against stored variable.

i have far, doesn't fall alert

 var matcheditem = msg.d[1][0]["matcheditem"];  var matchedtag = msg.d[1][0]["matchedtag"];   $('dd').find( $("#" + matchedtag) ).each( function () {     if ( matcheditem == $(this).html() ) {        alert("we have match");     }  }); 

* edit ** matcheditem = 'brian' matchedtag = 'customer name'

so, each customer name. if brian matched alert.

any pointers appreciated.

assuming matchedtag id of element want html of..then should work

   if ($("#" + matchedtag).html()==matcheditem){            alert("we have match");    } 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -