javascript - Hiding parts of an AJAX response -


I am calling an AJMX from every record in my DB & lt; pre > tags like this:

  & lt; Div id = "ajaxdiv" & gt; & Lt; Previous ID = "1" & gt; Record 1 & lt; / Pre & gt; & Lt; Previous ID = "2" & gt; Record 2 & lt; / Pre & gt; e.t.c. & Lt; / Div & gt;  

I want to be able to hide one or more of the selected records so that only the most relevant to the original query. The number of returned records may vary. Javascript will be inserted as a daom text, so it will not be executed, so I'm a bit of a loss, which can be completed by using JQuery Hide () etc.

Any help would be appreciated.

Upon receiving a response from AJAX, you can record as you are now if you are a Create an array that has hidden IDs.

  // After adding the result of your code / code in this way, // result is presented. Var idsToHide = [1, 3, 5]; Hide element through IdsToHide.forEach (functionIdId) {// jQuery $ ('#' + elementId). Solution ();});  

View


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -