javascript - Hide containing specific ID's -
I have an array of numbers from a number of tables and I used to call each I think I should use jQuery .find () in an array loop such as: If you need to use client side code to hide elements , Then try something like this: IDs of your TD are assuming "tr_0" "tr_1", and so on. By the way, the numbers are not used as IDs. array_keys on one page.
& lt; Tr & gt; has given an incremental ID, starting with 0. If my array returns 0,1,3,5 then I
& lt; Tr & gt; To hide, with an ID of 2 and 4 usually I use CSS and apply a style: display = none
$ Arr = array_keys ($ floor_item, $ po); // floor_item is my array & amp; PO value I am searching for foreach ($ key as $ key => item $) {print "& lt; tr id = '". $ Item "'& gt; & lt; td & gt;" . $ Item "& lt; / td> gt; & lt; / tr & gt;"; // This will show me that I want the ID // just here $ ("tr") is estimated. The fund ("$ item") .hide (); }
var jsArray = [& lt ;? Php echo ($ "ude_you_want_to_show_array"); & gt; $ ("# your_table_id tr"). Hide (); $ .each (jsArray, function (key, value) {$ ("# tr_" + Value) .show ();});
Comments
Post a Comment