1.$ ("#tdGeo input[type= ' checkbox ']:checked")---filter out all checkboxes that have been check
2.$ ("#tdCountry input[type= ' checkbox ']"). attr (' disabled ', ' disabled '). Removeattr ("checked"); ---Adding the disabled property and deleting the Checked property
3.$ ("#stateOptions"). HTML ("<option value= ' all ' >ALL</option>"); Dynamically Loading HTML---front-end
4.$ (This). Val (); ---Gets the value of the current element
5.$ ("#state"). Val (""); ---text box to empty
6.statetext.val (). replace (Obj.value +, "," ")---remove commas in text boxes with the Replace method
7.$ ("#stateOptions input[type= ' checkbox ']:gt (0)")---get all checkboxes, excluding the first one
8.var statestring = $ ("#state"). Val ();
var Statearr = new Array ();
Statearr = Statestring.split (",");
for (i = 0; i < statearr.length-1; i++) {
var state1 = statearr[i]; ---Gets the value in state, converts it to an array and loops the value in the format "1,2,3,4,5"
9.$ (This). Prop ("Checked", "true"); ---Add selected attributes to a checkbox
10.$ (' Html,body '). Click (function (e) {
if (e.target.id! = "Divstate" && e.target.id! = "State" && e.target.id! = "Stateoptions" && E.targ Et.id! = "Stateoption") {
$ ("#stateOptions"). Hide ();
} }); ---Add the click event to the entire HTML body by judging if the click is blank and hiding the relevant Div
--event.target.id gets the current target element ID
--event.target.tagname gets the current target element tagname such as: Span,div,input ...
--event.target.nodename gets the current target element nodename and tagname similar, general return such as: Span,div,input ...
Summary of the jquery trivia points used by Intel projects