Friday, December 29, 2017

javascript issues using e target tagName or prop in ie8

javascript issues using e target tagName or prop in ie8



I have the following logic that I did well in all browsers except the I8,

 < Code> $ (.has_tags li). Click (function (e) {if ($ (this) .hasClass (tag_clicked) and e.target.tagName! == LABEL) {$ (this) ($ $ $ $ $ $ $$$$$$ = LABEL) {$ (this) .addClass (tag_clicked). Children (Input). Prop (checked, true);}}); In a nutshell, it checks whether a list element is clicked, if it advertises that category, then checks the current list of styles and related inputs, however, if The label inside the element of this list is clicked, it ignores it because it is equivalent to clicking on the click on the checkbox checkbox, however, I88 handles it well when the list element is clicked. Power, but when it is done, click on the label, then nothing happens. I   

I propose to add an event to INPUT and trigger it when you click on the light (Click, function (e) {var $ target = $ (e.target); var $ input = $ (this). Find (input); if ($ target. Length = $ target.closest (label) Length) $ input.prop (check,! $ Input.prop (check)). Trigger (change) ;}); $ (Has_tags input). (Change.checkbox, function (e) {var $ input = $ (this) .closest (li); if (this.checked) {$ input.addClass (Tag_clicked)}} and {$ Input.removeClass (tag_clicked)}}}). Trigger (change.checkbox);



go to link download
download
alternative link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.