I am creating group of check boxes dynamically and one extra check box also for selecting all group at once that one too is generated dynamically  this is html output  &lt;input type="checkbox" id="all"&gt;all &lt;br&gt; &lt;input type="checkbox" name="question"&gt;a &lt;br&gt; &lt;input type="checkbox" name="question"&gt;b &lt;br&gt; &lt;input type="checkbox" name="question"&gt;c &lt;br&gt; &lt;input type="checkbox" name="question"&gt;d   this is jquery  $("document").ready(function() {     $("#all").on('change', function() {         if ($(this).is(":checked")) {             $("input[type=checkbox][name=question]").prop('checked', true);         } else {             $("input[type=checkbox][name=question]").prop('checked', false);         }     });       });   this is implementation.   It works fine when checkboxes are not generated dynamically  But when they are generated dynamically code has bug  I am able to check whole group but I am not able to check single checkbox  This is dynamically generated code  $('#demo3').on('change', function() {     if ($('input[type=checkbox]:checked')) {         var value = $('input[type=checkbox]:checked').val();         alert(value);         $("#demo3").hide();          $.getJSON("json/question.json", function(jd) {              var size = jd.length;               var table = "&lt;table&gt;&lt;tr&gt;&lt;th&gt;&lt;input id=\"" + "selectall" + "\" type=\"" + "checkbox" + "\"/&gt;" +                     "&lt;/th&gt;&lt;th&gt;Question&lt;/th&gt;&lt;th&gt;Option A&lt;/th&gt;" + "&lt;th&gt;Option B&lt;/th&gt;&lt;th&gt;Option C&lt;/th&gt;" +                             "&lt;th&gt;Option D&lt;/th&gt;&lt;th&gt;Answer&lt;/th&gt;&lt;/tr&gt;";               for (var n = 0; n &lt; size; n++) {                   table += "&lt;tr&gt;&lt;td&gt;" + "&lt;input name=\"" + "question" + "\" type=\"" + "checkbox" + "\" value=\"" + jd[n].questionid + "\"/&gt;" +                  "&lt;/td&gt;&lt;td&gt;" + jd[n].question + "&lt;/td&gt;" + "&lt;td&gt;" + jd[n].a + "&lt;/td&gt;&lt;td&gt;" + jd[n].b + "&lt;/td&gt;" + "&lt;td&gt;" + jd[n].c + "&lt;/td&gt;" +                         "&lt;td&gt;" + jd[n].d + "&lt;/td&gt;" + "&lt;td&gt;" + jd[n].ans + "&lt;/td&gt;&lt;/tr&gt;";               }             table += "&lt;/table&gt;";             $('#demo4').html(table);          });      } });  $('#demo4').on('change', function() {     if ($("input[type=checkbox][id=selectall]").is(":checked")) {         $("input[type=checkbox][name=question]").prop('checked', true);     } else {         $("input[type=checkbox][name=question]").prop('checked',false);     }  });
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
Why are low-rep users rate-limited when posting questions? I just encountered the following error:  Oops! Your question couldn't be submitted because: users with less than 125 reputation can only post questions every 20 minutes; try again later.  Why do you have this rule? Why 20 minutes? Citations with no bibliography at the end How do you produce a document with citations (\citep, \citet) working properly in the paper but without a bibliography at the end?  I've come up with one solution that is bad because it breaks my makefile.  latex file.tex bibtex file # comment out \bibliography{} command latex file.tex   Similarly, is there a way to produce the bibliography with no accompanying text?  Again, I've come up with a solution: fill an otherwise blank .tex file with \nocite{} commands.  However, this is a pain because I have to keep two files synced by hand (and regular expressions to search for \citep{author1, author2} can be a huge pain when there are pagebreaks...). I wanted to know if there is difference in terms of charging the battery when a MacBook Pro 16" is connected to two monitors via USB-C, both with Power Delivery capability.   In this specific case I am talking about the LG 27UK850-W monitors. The MacBook Pro 16" will be connected via USB-C to both of them and use them as external monitors. Since both can charge it as well, will the MacBook Pro  charge faster while being connected to both or will just one monitor be able to deliver the charge at a time? After the  of registering an account to book train tickets online using my British VISA card, I finally got into a position of being able to book a ticket, but what it appears to be telling me is that I'm only being added to a wait list, which I assume means my tickets aren't confirmed.  Can someone explain how the wait list works, and what my chances are of getting on the train successfully?    It currently says the wait list is 7 The train is the Mandor Express, from Delhi to Jodhpur on the 18th of Nov   Update: So I got the train! Although it didn't get confirmed until a few hours before it was due to leave. Is there a way to simulate multiple iphones using xcode/iphone sim? Highlight whole TreeViewItem line in WPF Clarification on maps in Salesforce I know this might be a very basic question but i'm pretty confused by this:  Map&lt;Id,Account&gt; accountWithOpportunities =      new Map&lt;Id,Account&gt;([SELECT Id,(SELECT Id FROM Opportunities) FROM Account]);   I have no clue on to where the Opportunities are relevant at all in this map and how they are stored or can be accessed?   Can anyone clear this out for me? Why is the sky not purple? I realise the question of why this sky is blue is considered reasonably often here, one way or another.  You can take that knowledge as given.  What I'm wondering is, given that the spectrum of Rayleigh scattering goes like $\omega^4$, why is the sky not purple, rather than blue?    I think this is a reasonable question because  (or, strictly, violet or indigo) in rainbows, so why not across the whole sky if that's the strongest part of the spectrum?  There are two possible lines of argument I've  and I'm not sure which (if not both) is correct.  Firstly, the Sun's thermal emission peaks in the visible range, so we do actually receive less purple than blue. Secondly, the receptor's in our eye are balanced so that we are most sensitive to (roughly) .  Our eyes are simply less sensitive to the purple light than to the blue. Dynamic Paint not showing in rendered image Do file descriptors optimise writing to files? If I run:  sudo chown -R user:user /   Can I revert it to what it was before I ran it? Add a confirmation before moving comments to a chat Bash built-ins with no manual entries What do I need in a camera to take non-blurry photos of a fast-moving child? I'm a mom who is obsessed with taking photos of my now 2 year old daughter.  I currently have a Nikon j1 which I like, but I find the shutter speed is still a bit slow and when you're trying to take photos of a speedy little girl, I end up with a lot of blurry images.  So I'm looking for a camera with a very fast shutter speed that will allow me to take good photos of a very fast moving child.  Also that can take photos in low light. I've been looking at the canon eos rebel but I'm not sure. Would like it to be able to take videos as well. Any advice? Is there a website listing the location of all the Windows 10 lock screens? Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken. Revisiting question templates suggested to have templates for tags. Their example was with the  tag on Stack Overflow.  I'm suggesting a more general approach:  Templates, Mark II  I suggest that each site will have a template. That template will prefill the  textbox when a new question is asked. However, it will be completely optional.  Something like (for Stack Overflow):  ## The Problem ## { Please tell us what the problem is with as many details as possible.   Include language, operating system, and any other relevant information.   Remember to add the relevant tags below, too. } ## Attempted Solutions ## { Please tell us what you've tried so far. Have you tried searching Google?    What queries? } ## Existing Code ## { Do you have any existing code to show? Please keep it short and simple.    We should be able to detect the problem right away. }   Why am I suggesting this?  Well, it seems as though most users will stick with the default. They don't bother to read, and so prefilling the question form for them with information that we know might be relevant, will forceWe'll get to that in a second them to actually stop and read.  Scenarios:   Best case: User arrives to ask a question, actually reads the template, fills the correct information in the placeholders. (Yeah, because that'll happen a lot) Neutral: User simply removes all of the template text and rewrites their own question. Result is exact same as we have currently. Worst case: User will ignore or misunderstand the template, will use it wrong or not at all and we'll get something like  &lt;template text here, still unfilled&gt; &lt;(crappy) question&gt;   This can be solved in a couple different ways. We could detect the template tags (i.e. { }, subject to discussion), and throw an error when a user attempts to post with them still available. We could also act more autonomously and remove placeholders which still exist.    Some more points:   Templates should be per-site, not per-tag. Sure, there are differences between the tags, but all questions are expected to have the same general information, and this isn't meant to be a rule, but a guideline to help write better questions. Site templates should be editable by that site's mods, like close reasons. We could autofocus on the first placeholder, and perhaps implement TAB to jump from one placeholder to the other, similar to mixins in IDEs. This doesn't have to be implemented everywhere. This suggestion makes sense to Stack Overflow or Superuser, but not to Anime &amp; Manga or Gaming All of the details are subject to discussion, and all discussion is welcomed. Where has all the RAM gone? I have 1GB of RAM, and when I run NetBeans and Firefox, they get about 300MB of RAM. At some point, the system becomes very slow, probably 100 times slower than normal, switching windows (Alt+Tab) becomes a huge task and the computer is practically useless. This is probably the moment when it starts to swap.    Two questions:   According to images provided, where has all the RAM gone? When I calculate all the processes memory, it is far smaller then 1GB. Is it normal for system to become 100 times slower when the RAM is full and using swap space?   On another computer with 4GB of RAM I have no problems.     Update: I added 2GB of RAM, now I have 3GB. Anyone who wants to use heavy apps with 1GB on Unity, I don't think it's going to work. Works fine on an empty desktop :) Was or is? Confusion Equivalent of String.format in jQuery Which tag is used in the title of a question?   It does not seem to be the most popular It does not seem to be the first in the tagging order:   This question   is prefixed with NGINX (which is actually completely fine)  And it is tagged with "php nginx fastcgi magento" in the order of popularity.  Can we choose the tag to use in the title manually?