jQuery: selecting checked checkbox

The name of the field isn’t foo, it is foo[]. You could use the attributeStartsWith selector: $(“input[name^=’foo’]:checked:enabled”,’#myform’); Ideally, you’d be able to do this: $(“input[name=”foo[]”]:checked:enabled”,’#myform’); But as this answer explains, jQuery uses this to parse the value part of the attr=value condition: ([‘”]*)(.*?)\3|)\s*\] \3 being the group containing the opening quotes, which weirdly are allowed … Read more

How to hide the eye from a password input in MS Edge and IE [duplicate]

I tried to test both of your code snippets on the IE 11, MS Edge legacy browser, MS Edge Chromium browser and Firefox. It worked on my side and it is not showing the Reveal password button (Eye). Tested code: <!DOCTYPE html> <html> <head> <style> input::-ms-reveal, input::-ms-clear { display: none; } </style> </head> <body> Password: … Read more

Unable to simulate keypress event in Angular 2 unit test (Jasmine)

I’ve had some trouble simulating a keypress in a unit test also. But came across an answer by Seyed Jalal Hosseini. It might be what you’re after. If you’re attempting to simulate a keypress you can trigger an event by calling dispatchEvent(new Event(‘keypress’)); on the element. Here is the answer I’m referring to which gives … Read more

Add a text suffix to

You can use a wrapper <div> for each input element and position the unit as a pseudo element ::after with the content of your corresponding units. This approach works well for the absolute positioned pseudo elements will not effect the existing layouts. Nevertheless, the downside of this approach is, that you have to make sure, … Read more

iOS input focused inside fixed parent stops position update of fixed elements

It’s a well known bug on Safari, both on iPad and iPhone. A workaround it’s to change the position to absolute to all elements set with fixed position. In case you are using Modernizr you could also target mobile devices this way: jQuery code $(document).ready(function() { if (Modernizr.touch) { $(document) .on(‘focus’, ‘input’, function(e) { $(‘body’).addClass(‘fixfixed’); … Read more

accept Attribute in Microsoft Edge

“accept” attributes are definitely not supported in Microsoft Edge at this point. I confirmed your behavior as “no go” in edge, but showing up in IE via the […] thing in the upper right of Edge. The Edge status shows it as “Under Consideration” with just 198 votes at https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/13661175-full-spec-support-for-accept-in-input-type-file . If you’re interested in … Read more

making a input type “file” hidden with button

You can actually do it with label, you just have to hide the input. <!– head –> <link href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css” rel=”stylesheet”/> <!– body –> <label for=”upload”> <span class=”glyphicon glyphicon-folder-open” aria-hidden=”true”></span> <input type=”file” id=”upload” style=”display:none”> </label>

iOS 7 Safari: OS locks up for 4 seconds when clicking/focusing on a HTML input

(There are some somewhat-effective solutions, see near the end of the list) At my company we are also suffering from this. We filed an issue with Apple but have heard mum. Here are some interesting jsfiddles to help illustrate some of the issues, it definitely seems to revolve around the number of hidden fields, and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)