I had guessed that this code would work. But the JS doesn't alert anything. What is the best way to run functions on replaced content? It is a simple code as you can see, if you work with jquery. I need answers only if you have suggestions.  &lt;script src="https://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;  &lt;button type="button" id="add" name="sub"&gt;Add&lt;/button&gt;   &lt;script&gt; $(document).on('click',"#add",function(){ $( this ).replaceWith("&lt;button type='button' id='sub'&gt; Alert &lt;/button&gt;"); });  $(document).ready(function(){ $("#sub").click(function() { alert("Does it alert?"); }); }); &lt;/script&gt;
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.
Triangular Numbers Modulo $k$ - Hit All Values? Is it the "Stack Exchange Network" or the "Stack Overflow Network"? Does Find My Mac work if the disk gets erased? How to start a new Linux distro? I am looking for QGIS function to extract (or detect) edge from a raster, which was referred in here,  as answer by @MappaGnosis.  The name could have changed since then, or it may have been integrated into other tool... I cannot find it in my QGIS Processing Toolbox (2.14.10 and 2.18.2).  There are similar tools such as GRASS "i.zc Zero-crossing" and SAGA "Gaussian filter", but I am hoping to find this QGIS geoalgorithm. What overpowered combinations would be available if I allow a bonus action to be used in place of a standard action? It has come up in game a couple of times that a player might want to cast a spell that has a casting time of 1 bonus action using their "main" action (if they have another bonus action they also want to take on that turn, such as giving bardic inspiration, or controlling a Bigby's hand, etc.)  On the face of it, it seems obvious that something (a bonus action) that is usually much faster than a full action could be done as your full action.  Although the question comes up most often with respect to spellcasting, if I house rule this, I would rule that any bonus action can be taken as a regular action instead; however, I would not allow the same type of bonus action to be taken twice (so no giving bardic inspiration to two allies on the same turn, for instance).   Are there any abusive or overpowered combinations I should be wary of if I were to allow a character to take 2 bonus actions instead of one regular action and one bonus action on a turn?   The issue of casting two bonus-action spells would not come up because the rule against casting 2 spells on your turn unless one of them is a cantrip with a casting time of 1 action would still be in effect:  PHB p. 203 (under Bonus Action casting time)     You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.   I know it's hard to prove/justify a negative answer to a question like this, but I'd be happy to get answers that say you don't think there would be any issues if you describe how you came to that conclusion. Why does holding something up cost energy while no work is being done? How can I prevent Windows from prompting to restart my computer after an update? $P(\limsup A_n)=1 $ if $\forall A \in \mathfrak{F}$ s.t. $\sum_{n=1}^{\infty} P(A \cap A_n) = \infty$ Let $\mathfrak{F} = (A_n)_{n \in \mathbb{N}}$. Prove that $P(\limsup A_n)=1$ if $\forall A \in \mathfrak{F}$ s.t. $P(A) &gt; 0, \sum_{n=1}^{\infty} P(A \cap A_n) = \infty$. (Side question 1 Is second Borel-Cantelli out because we don't know if the $A_n$'s are independent?)  Suppose $\forall A \in \mathfrak{F}$ s.t. $P(A) &gt; 0, \sum_{n=1}^{\infty} P(A \cap A_n) = \infty$, but $P(\limsup A_n)&lt;1$. My prof gave us this convenient hint: Show $\exists M &gt; 0$ s.t. $P(\bigcap_{j=M}^{\infty} A_j^{c}) &gt; 0$.  $1 &gt; P(\limsup A_n)$  $1 - P(\limsup A_n) &gt; 0$  $P(\liminf A_n^{c}) &gt; 0$  By definition of $\liminf A_n^{c}$, $\exists M &gt; 0 $ s.t. $P(\bigcap_{j=M}^{\infty} A_j^{c}) &gt; 0$. (Side questions 2 and 3 Isn't this =1? ...Wait, is that what we're trying to prove? Haha)  $\to 1 - P(\bigcup_{j=M}^{\infty} A_j) &gt; 0$  $\to 1 &gt; P(\bigcup_{j=M}^{\infty} A_j)$  Main question: Now I guess we have to come up with some A s.t.  $\to 1 &gt; P(\bigcup_{j=M}^{\infty} A_j) \geq \sum_{n=1}^{\infty} P(A \cap A_n)$, or is there something else to do? Show that $\gcd(a^2, b^2) = \gcd(a,b)^2$ At one point, I decided to make friends with the low-lying spectrum of QCD. By this I do not mean the symmetry numbers (the "quark content"), but the actual dynamics, some insight.  The pions are the sloshing of the up-down condensate, and the other pseudoscalars by extending to strangeness. Their couplings are by soft-particle theorems. The eta-prime is their frustrated friend, weighed down by the instanton fluid. The rho and omega are the gauge fields for flavor SU(2), and A1(1260) gauges the axial SU(2), and they have KaluzaKlein-like echoes at higher energies, these can decay into the appropriate "charged" hadrons with couplings that depend on the flavor symmetry multiplet. The proton and the neutron are the topological defects. That accounts for everything up to 1300 but a few scalars and the b1.  There are scalars starting at around 1300 MeV which are probably some combination of glue-condensate sloshing around and quark-condensate sloshing around, some kind of sound in the vacuum glue. Their mass is large, their lifetime is not that big, they have sharp decay properties.  On the other hand, there is nothing in AdS/QCD which should correspond to the sigma/f0(600), or (what seems to be) its strange counterpart f0(980). While looking around, I found this discussion: . The literature that it pointed to suggests that the sigma is a very unstable bound state of pions (or, if you like, tetraquarks).   gives strong evidence for an actual pole;  gives a more cursory review. The location of the pole is far away from the real axis, the width is larger than the mass by 20% or so, and the mass is about 400MeV. The authors though are confident that it is real because they tell me that the interpolation the interactions of pions is safe in this region because their goldstone properties dominate the interactions. I want to believe it, but how can you be sure?  I know this particle was controversial. I want to understand what kind of picture this is giving. The dispersion subtraction process is hard for me to visualize in terms of effective fields, and the result is saying that there is an unstable bound state.  Is there a physical picture of the sigma which is more field theoretical, perhaps even just an effective potential for pions? Did anyone who convinced himself of the reality of the sigma have a way of understanding the bound state properties? Is there an analog unstable bound state for other goldstone bosons? Any insight would be welcome. I have sucessfully installed AniMove by activating experimental plugins (yay! thanks gis.stackexchange). But I can't find it in Qgis! Yes I have activated it. Where is it? Is this a common bug? I searched for it the toolbox, I looked up the names of the several single tools based on this  and only found "Kernel Density", which is filed under SAGA. But I don't have SAGA installed (and don't know if I need to?) How do I turn on SharePoint App store in SharePoint 2013 How do I correctly clone a JavaScript object? I have an object x. I'd like to copy it as object y, such that changes to y do not modify x. I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties. This isn't a problem, since I'm copying one of my own literal-constructed objects.  How do I correctly clone a JavaScript object? Normal text is invisible when using beamer with notes and XeLaTeX I'm using beamer with xelatex to prepare a talk.  If I switch on notes on right I'm experiencing strange behaviour:  When using csqoutes in the title, all normal text afterwards becomes invisible (or white). The text selectable in the output pdf. Note that the text is also visible in the small preview on the note page.  This does not happen when using pdflatex or lualatex.  MWE:  \documentclass{beamer} \usepackage[autostyle=true,german=quotes]{csquotes}  \usepackage{pgfpages} \setbeameroption{show notes} \setbeameroption{show notes on second screen=right}  \begin{document}    \begin{frame}         \frametitle{\enquote{Enqouted Title}}     \end{frame}      \begin{frame}         \frametitle{This is the second slide}         Lorem ipsum dolor sit amet, consectetuer adipiscing elit.     \end{frame} \end{document}   Update:  csqoutes is not the culprit. Seems to be a general problem when using xelatex and beamer with notes enabled.  New MWE:  \documentclass{beamer}  \usepackage{pgfpages} \setbeameroption{show notes} \setbeameroption{show notes on second screen=right}  \begin{document}     \begin{frame}         \frametitle{First Slide Title}         Here be text     \end{frame}      \begin{frame}         \frametitle{This is the second slide}         Lorem ipsum dolor sit amet, consectetuer adipiscing elit.     \end{frame} \end{document} How can I install Ubuntu without removing Windows? How to debug "Cross-thread operation not valid" error in C#? Storing hard crusted bread I'm currently baking a batch of sourdough bread. My last batch turned out perfectly with a hard crust and chewy inside. My problem is how to store the bread such that the crust stays hard. If I put it in a plastic bag the crust goes soft in a matter of hours and I'm afraid that the bread will turn dry if I leave it without some kind of protection. Note that I'm not looking for a long term storage solution.  What is the best way to store my bread, such that the crust stays hard and the inside stays chewy? If $\psi h$ is in $L^2$ for all $h\in L^2$, must $\psi$ be essentially bounded? If $\psi:[a,b]\to\mathbb C$ is a (measurable) function such that $\psi h$ is in $L^2[a,b]$ for all $h\in L^2[a,b]$, then must $\psi$ be essentially bounded?  The converse direction is clear: If $\psi$ is essentially bounded, then $\|\psi h\|_2\leq \|\psi\|_\infty\|h\|_2$ for all $h\in L^2$, and thus the multiplication operator $M_\psi:h\mapsto \psi h$ is defined and bounded.  The question here is whether, without prior assumptions on $\psi$, simply having $M_\psi(L^2)\subseteq L^2$ implies that $\psi$ is bounded. Why singularity in a black hole, and not just "very dense"? Why does there have to be a singularity in a black hole, and not just a very dense lump of matter of finite size? If there's any such thing as granularity of space, couldn't the "singularity" be just the smallest possible size?