As I've discovered with Ajax in jQuery, loaded elements are not jQuery objects. What's the best way to 'rescan' the document to make elements loaded with Ajax jQuery objects?  In the code below jq('.storyBlock button').click(function() and the other functions do not fire on the loaded Ajax html. How best to change this code so they will fire?  var jq = jQuery.noConflict();  jq(document).ready(function() {     // Disable buttons after clicking     jq('.storyBlock button').click(function() {         jq(this).addClass('selected');         jq(this).parent().addClass('disabled');         jq(this).parent().find('button').attr('disabled', true);     });     // Event Handler     jq('.storyBlock button').click(function() {         // Find link         var getID = jq(this).data('link');         console.log(getID + '.html');          // Load file and insert after last story         jq.ajax(getID + '.html').done(function(html) {         jq('#stories &gt; div:last-child').after(html);         if ( (getID) != 'start' ) {             jq('html,body').animate({ scrollTop: jq('#' + getID).offset().top },'slow');         } else {             jq('.storyBlock').remove();             jq('#stories &gt; div' ).load( "start.html" );             jq('html,body').animate({ scrollTop: jq('#start').offset().top },'slow');         }        });     }); });
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.
How can I make a camera the active one? I got a paged loop that pulls in 4 posts per page from custom post type. It works great, with the only downside that the pagination wont go over the page/20 everything after that is 404, and the posts_nav_link won't show the next arrow at all. Like the pages just aren't there.  In total there are 119 published posts in the custom post type. If I change posts_per_page to, say 6, then I get access to more of the posts from the end, but it also stops at the page/20.  On the production site the pagination stops at 21, I guess because the live database has more entries.  I got the "Blog pages show at most" setting set to 6.  Here's the loop I'm using:  &lt;?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args  = array(     'posts_per_page' =&gt; 4,     'orderby'        =&gt; 'modified',     'post_type'      =&gt; "projekte",     'paged'          =&gt; $paged ); $custom_query = new WP_Query($args); $c = 0; while($custom_query-&gt;have_posts()) :     $custom_query-&gt;the_post();     ?&gt;     &lt;article&gt;...&lt;/article&gt;     &lt;?php endwhile; wp_reset_postdata(); // reset the query ?&gt;   I've gone through the functions.php a million times looking for a some limiting get_pre_posts filter but there's nothing I can see.  I also got an error log setup and nothing is returned there, I've tested it that it works.  Any suggestions? How to *disable* automatic reboots in Windows 10? For a project into balloon simulation I'd like to know how the force on a balloon changes with altitude:  I know that the Buoyant force on a balloon is:  $F = (\rho_{air} - \rho_{helium})gV$  Using changing air density from the international standard atmosphere and changes in gravitational acceleration I can calculate the buoyant force and add this to the (negative) force of gravity mg.  However I know that it isn't this simple, the balloon changes volume with altitude as the air pressure outside the balloon changes.  I'd like to know how the balloon inflates - this would be a great help!  I think it may be something to do with ideal gas laws -  I can calculate air temperature and pressure from the international standard atmosphere but do I use pressure as the air pressure? - or air pressure minus balloon pressure? Dynamic Comparison Operators in PHP Trying to run , embedded Tomcat instance fails.  Error seems to appear here:    Apr 17, 2015 2:13:47 AM org.apache.catalina.startup.HostConfig deployDescriptor  INFO: Deploying configuration descriptor /opt/OpenForisCalc/calc-server/tomcat/conf/Catalina/localhost/calc.xml  Apr 17, 2015 2:13:58 AM org.apache.catalina.core.StandardContext startInternal   SEVERE: Error listenerStart   Then if messes up with the rest (this repeats a lot):  Apr 17, 2015 2:13:58 AM org.apache.catalina.core.StandardContext startInternal  SEVERE: Context [/calc] startup failed due to previous errors More and more frequently in the review queues, I am spending time either fixing a post or considering whether an edit is valid, etc, only to make changes and have them denied/not count because someone else has blindly hit the approve button in the meantime.  My proposal is for the system to "lock" a post in the review queue once it has been presented to someone for review.  Do not let anyone else (in the review queue) do anything with it until it is released by the last user it was presented to (or a certain amount of time has elapsed).    By "lock" I mean that it won't show up in anyone elses list until released.  I did NOT mean that it would be in multiple queues and be unactionable in some of them.  This would fit well as the queues only present one at a time anyway.  This will allow people trying to make good decisions the time to do it and prevent someone else from making that effort a waste of time.  As support, look to some of the published reasoning behind the auto-question ban.  A large portion of it is that bad questions waste the time of the community.  Taking the time to ensure you are making a good decision in the /review queue only to have it not count because someone was badge-whoring and clicking the approve button as fast as they could also wastes the users time... arguably the more (for lack of a better way to put it) valuable user who is willing to invest some time and thought into making the site better. Which external Javascript libraries work with Lightning Locker Service? Components often seem to work with external libraries until the Locker Service is enabled. What libraries work with locker service enabled and where can I go to find out? How do I force TeX to completely use the 1st column? How do I force TeX to completely use the 1st column before writing to the second column?  Right now I dont have enough content to fill one whole page. So the left and right columns are equally filled, leaving 25% symmetrical empty page at bottom. How do I fill the left column first, and then the right?  \documentclass{article}  \usepackage{multicol} \usepackage[scale=0.9]{geometry} \usepackage{amssymb} \renewcommand{\labelitemi}{\tiny$\blacksquare$} \begin{document} \begin{multicols}{2}      %lots of text goes here  \end{multicols} \end{document} When creating a question/answer on the Android app, it gives you a little bar above the keyboard to bold/italicize, add a link easily, add a picture etc.  When editing however, this bar isn't shown. To ease editing on mobile, it would be exceedingly helpful to have this bar show up. I find myself resorting to the full site to add a embedded link if I can't at the moment remember the exact syntax. Why is it usually "friend of his", but no possessive apostrophe with "friend of Peter"? As  shows, we nearly always use the possessive form of personal pronouns for friend of mine/his/ours/etc.  But when it comes to actual names, we prefer  without the possessive apostrophe. That preference is even more marked with, say, . Not that I think the usage itself is particularly American - it's much the same with .  Personally, I find friend of him grates. In general I've no strong feelings either way as to whether it's friend of Peter or friend of Peter's (though I deplore the possessive in ), but in line with many others, I really don't like the possessive in relation to things like countries.  Why is this?   Edit: Noting an apparent "progression" (pronoun -> person -> nation) marked by reduction in use of the possessive, I checked at a finer "granularity". NGram shows that although it does occur,  virtually "flatlines" against friend of mine. But the bias reduces through of you, of us, and by the time I get to  it's much less extreme. There seems to be something "egocentric" about the double possessive.  Presumably when babies learn to speak, they soon notice that possessive pronouns, possessive apostrophes, and the word "of", all do the same job. Parents would correct a child who says "of mine's", but probably wouldn't even notice the same "redundancy" in "of Peter's". Younger speakers are unlikely to even be talking about something "of America's". Perhaps as we mature we tend to discard the "double possessive" for the more "distant" things that only adults are likely talk about, but we keep it for "closer" people because that's how we spoke when we were younger.  EDIT2 I note that I'm a great fan of him is vanishingly rare compared to ...fan of his, but with ...fan (of John) the double possessive occurs far less often than ...friend (of John's). Usage seems to be affected by the noun before "of" as well as the one after it. This is getting complicated... Is it only red, green and blue that can make up any color through additive mixture? I'm reading about color vision and have some trouble understanding the motivation for why the  was suggested in the first place. The book I'm reading ("Psychgology: The science of mind and behavior") states:     At the beginning of the nineteenth century it was discovered that any colour in the visible spectrum could be produced by some combination of the wavelenghts that corresponds to the colours blue, green and red in what is known as additive color mixture.   From the explanation in the book, it seems like this somehow should be a reason for also supposing that the human retina was composed of cones sensitive to the colors green, red and blue respectively. I guess this would be a valid argument if it was only red, green and blue that, through additive mixture, could make up any color.  Is it only red, green and blue that, through additive mixture, can make up any color? Let $f$ be a continuous function. If $f$ is uniformly continuous then it maps cauhy sequence into cauchy sequence. Is the converse true? That is if $f$ maps cauchy into cauchy gives the uniform continuity of $f$. I think it's no. Can suggest a counter example I'm working through a problem regarding expected values in Markov chains, and at some point it says:     Recall from probability that if $X$ is a positive integer valued random variable, then $\mathbb{E}[X] = 1 + \sum^\infty_{k=1}\mathbb{P}(X &gt; k)$.   I know that by definition $\mathbb{E}[X] = \sum_a a\mathbb{P}(X = a)$, but I can't see how the above equality follows from this, nor am I sure if this is how to approach the problem. I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other? Why do I need to type `./` before executing a program in the current directory? While executing a C program, a.out, using the Ubuntu terminal, why do I always need to type ./ before a.out, instead of just writing a.out? Is there solution for this? What was L's real name? I watched through Death Note once, and I never remember hearing L's name, even after he died.  What was L's real name, or did he never have one (it was never said)? KeyboardViewer app is saved from this AppleScript.  on run {input, parameters}     if application "KeyboardViewer" is running then         quit application "KeyboardViewer"     else          activate application "KeyboardViewer"     end if     return input end run   Dock toggle save. Adding shortcut to above, needs some work...   Syntax error Can’t set application "KeyboardViewer" to some object. Access not allowed.  tell application "System Events"     set application "KeyboardViewer" to (keystroke "K" using control down) end tell My router can do port-forwarding based on MAC addresses. That is, a specific MAC will get a specific IP, for which I can configure a set of ports to be forwarded. In order to easily change that set of ports, I'd like to have different connections in the Network manager.  How do I change the MAC address for a network connection? Spaces in variable assignments in shell scripts What is the difference between below variables assignments?   var=23 var =23 var= 23 var = 23   Is there any difference in space around the assignment operator?