jquery - How can i hide or show the Items in the table based on Filter condition -


I am dynamically creating a table and related filters for it too.

This is my JSF <

This is my code

 < Code> function FetchVendorCategories (vendor_id) {$ ("# tablecontent") empty (); Return $ .ajax ({type: 'obtaining' URL: that URL + '/ admin / getvendorequestedcategories VENDOR_ID =' 'VENDOR_ID, jsonpCallback:' json callback ', datatype:' jsonp ', jsonp: false, success: function ) {If (response.details.length & lt; = 0) {$ ("# deletebtn") hide ();}} filterhtml = ' gt;'}}} Filterhtml + = '& lt; / select & gt;'; (" # $ (Filterhtml) attached; $ ("# Tablecontent") enclosed (HTML).}})}} 
gt; & lt; Div class = "col_chk"> Category requested & lt; / p & gt; & lt; / div & gt; & lt; div class = "col_stat" & gt; & lt; p & gt; << P & gt; Message & lt; / div & Lt; div class = "col_dat">

date

Listen to Change Event (which you had already done),

Value $ (this) .val () (or this.value ), hide all the table rows and show them that you want to:

  $ (document) .on ('change', 'select # filterstatus', function (event) {$ (". AddreqTableCols"). Hide (); $ (". Label_p: in it ('" + $ (This) .val () + "')") .closest ("AddreqTableCols"). Show ();});  


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -