I had this script working before when it was just an inline script on a WordPress page. But now I load it from function.php.  This works fine for my other JavaScript scripts, but .click or .on won't work on this script...  $( "td.event-test" ).on("click",   function() {     $("p").empty();     $(".event-title").empty();     $(".event-title2").empty();     $("&lt;h1&gt;EVENT #01&lt;/h1&gt;").appendTo(".event-title");     $("&lt;p&gt;Here is information for event!&lt;/p&gt;").appendTo(".event-info");     $("&lt;p&gt;more info for event&lt;/p&gt;").appendTo(".more-event-info");     $("&lt;p&gt;&lt;a&gt;LINK TO EVENT SITE&lt;/p&gt;&lt;/a&gt;").appendTo(".event-link");     $("a").attr("href", "events");   } );   It won't work, and the .click version won't work either:  $( "td.event-test" ).click(   function() {     $("p").empty();     $(".event-title").empty();     $(".event-title2").empty();     $("&lt;h1&gt;EVENT #01&lt;/h1&gt;").appendTo(".event-title");     $("&lt;p&gt;Here is information for event!&lt;/p&gt;").appendTo(".event-info");     $("&lt;p&gt;more info for event&lt;/p&gt;").appendTo(".more-event-info");     $("&lt;p&gt;&lt;a&gt;LINK TO EVENT SITE&lt;/p&gt;&lt;/a&gt;").appendTo(".event-link");     $("a").attr("href", "events");   } );   It loads the script as I can see console.log printing "test" string from the first line of the JavaScript script.
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.
Change font size of labels in figures to any font size I want to change the font size of the label of a figure environment to any font size. It's possible to use the package caption with the argument font=Large for example. But I found no way to choose any font size, e.g. fontsize=28pt.  Here an example code:  \documentclass{standalone} \usepackage{anyfontsize}  \usepackage[font=Large]{caption} %\usepackage[fontsize=28pt]{caption} % not implemented   \begin{document} \parbox[t]{20cm}{  \fontsize{28}{30} \selectfont  \begin{figure}     %\includegraphics{figure.eps}     \caption{\label{fig_req_osnr} \fontsize{28}{30} \selectfont My caption.} \end{figure}  }  \end{document}     Do you have any ideas? Benefits of using QQ-plots over histograms In , Nick Cox wrote:     Binning into classes is an ancient method. While histograms can be useful, modern statistical software makes it easy as well as advisable to fit distributions to the raw data. Binning just throws away detail that is crucial in determining which distributions are plausible.   The context of this comment suggests using QQ-plots as an alternative means to evaluate the fit. The statement sounds very plausible, but I'd like to know about a reliable reference supporting this statement. Is there some paper which does a more thorough investigation of this fact, beyond a simple “well, this sounds obvious”? Any actual systematic comparisons of results or the likes?  I'd also like to see how far this benefit of QQ-plots over histograms can be stretched, to applications other than model fitting. Answers on  agree that “a QQ-plot […] just tells you that "something is wrong"”. I am thinking about using them as a tool to identify structure in observed data as compared to a null model and wonder whether there exist any established procedures to use QQ-plots (or their underlying data) to not only detect but also describe non-random structure in the observed data. References which include this direction would therefore be particularly useful. How does temperature relate to the kinetic energy of molecules? In ideal gas model,  is the measure of average kinetic energy of the gas molecules. If by some means the gas particles are accelerated to a very high speed in one direction, KE certainly increased, can we say the gas becomes hotter? Do we need to distinguish the random vibration KE and KE in one direction?  Furthermore, if we accelerate a block of metal with ultrasonic vibrator so that the metal is vibrating in very high speed with cyclic motion, can we say the metal is hot when it is moving but suddenly become much cooler when the vibration stop? What level is a spell if you cast it without expending a spell slot? Shapefile layer no longer editable (toggle edit option greyed out) in QGIS? How do I get my C# program to sleep for 50 msec? How do I get my C# program to sleep for 50 milliseconds?  This might seem an easy question, but I'm having a temporary brain failure moment! Assumptions of linear regression Where is Jon going? At the end of S08E06 of Game of Thrones, Jon Snow along with Tormund and others of the Night's Watch      leave the Night's Watch.   and go into the woods.  Where are they going? And why? I am trying to show that: \begin{equation} \frac{n}{\phi(n)} = \sum_{d \mid n} \frac{\mu^2(d)}{\phi(d)} \end{equation} where $\phi(n)$ is  and $\mu$ is the .  The identity clearly holds for $n=1$, so if we write $n=p_1^{a_1} \cdots p_k^{a_k}$ for the prime decomposition of $n$, the left-hand side becomes: \begin{eqnarray*} \frac{n}{\phi(n)} &amp; = &amp; \frac{p_1^{a_1} \cdots p_k^{a_k}}{\phi(p_1^{a_1}) \cdots \phi(p_k^{a_k})} \\ &amp; = &amp; \frac{p_1^{a_1} \cdots p_k^{a_k}}{(p_1^{a_1-1})(p_1-1) \cdots (p_k^{a_k})(p_k-1)} \\ &amp; = &amp; \frac{p_1 \cdots p_k}{(p_1-1)\cdots (p_k-1)} \end{eqnarray*}   Whereas the right-hand side becomes:  \begin{eqnarray*} \sum_{d \mid n} \frac{\mu^2(d)}{\phi(d)} &amp; = &amp; \sum_{\substack{d \mid n \\ p^2 \nmid d}} \frac{1}{\phi(d)} \\ &amp; = &amp; 1 + \frac{1}{\phi(p_1)} + \dots + \frac{1}{\phi(p_k)} + \frac{1}{\phi(p_1 p_2)} + \dots + \frac{1}{\phi(p_{k-1}p_k)} \\ &amp; + &amp; \dots + \frac{1}{\phi(p_1 \cdots p_k)} \\ &amp; = &amp; 1 + \frac{1}{p_1 - 1} + \dots + \frac{1}{p_k - 1} + \frac{1}{(p_1 - 1)(p_2 - 1)} + \dots + \frac{1}{(p_{k-1}-1)(p_k-1)} \\ &amp; + &amp; \dots + \frac{1}{(p_1 - 1) \cdots (p_k - 1)} \end{eqnarray*}  I am unsure of how to proceed from this point however. Any help would be much appreciated. Under what circumstances will a passive HDMI-to-VGA adapter work? I have bought a no-brand, passive HDMI Male to VGA Female adapter, to link up a PC with a more dated monitor. It did not work.  After doing some reading, I have learned that buying such an adapter is often discouraged because in many cases it will not convert the signal from Digital to Analog, or the Motherboard/CPU on a specific computer might not be compatible with that particular adapter.   So my question is: seeing how there are so many of these passive adapters on the market, are there circumstances under which they actually do suffice to connect an HDMI output to a VGA input? Or are they generally just a rip-off?  Example of the kind of adapter I bought: Centre of $GL_n(\mathbb R)$ How to prove that center of $GL_n(\mathbb R)$ is scalar matrices?  Again what can you say about the center of set of all upper triangular matrices and center of set of all diagonal matrices. Floating point comparison Order of products of elements in a finite Abelian group MySQL Prepared statements with a variable size variable list How would you write a prepared MySQL statement in PHP that takes a differing number of arguments each time? An example such query is:  SELECT `age`, `name` FROM `people` WHERE id IN (12, 45, 65, 33)   The IN clause will have a different number of ids each time it is run.  I have two possible solutions in my mind but want to see if there is a better way.  Possible Solution 1 Make the statement accept 100 variables and fill the rest with dummy values guaranteed not to be in the table; make multiple calls for more than 100 values.  Possible Solution 2 Don't use a prepared statement; build and run the query checking stringently for possible injection attacks. In particular, I am referring to the Pearson product-moment correlation coefficient. What happens if you plug more than one charger in the new MacBook Pro (2016)? Apple's  decision to convert all the ports on their 2016 MacBook Pro lineup to USB-C ports contributes to blur the difference between ports that supply power (such as a power adapters) and ports that can power external devices (such as USB keys, mice or other gadgets).    This made me think about the following scenario: you sit at a table where your laptop is plugged in on the right, and don't notice that it is plugged in, so you decide to charge it with a second nearby charger that is laying around (i.e. belonging to someone who lives with you and who recently sat at the same spot).  What would happen then?   Would the computer charge twice as fast, would one of the chargers be dismissed by the system (which one?), or would it generate a surcharge that would destroy the computer?  I couldn't find anything about this online, but since I am always trying to force a USB in the MagSafe charger of my MacBook Air, I think that I could easily end up making this kind of mistake.  Note: My question asks what happens when two chargers are inserted into a MacBook Pro, but I am also wondering what would happend if 3, or 4 chargers were inserted. Although this scenario is unlikely to happen by mistake, it would constitute an obvious vulnerability to an exposed device, i.e. in a public space. Adding feature class to Map in CURRENT project using ArcPy in ArcGIS Pro? Computing $\lim_{n\rightarrow \infty} \frac{1+\sqrt{2}+\sqrt[3]{3}+\cdots+\sqrt[n]{n}}{n}$. I have a problem with the calculation of the following limit. \begin{equation} \lim_{n\rightarrow \infty} \frac{1+\sqrt{2}+\sqrt[3]{3}+\cdots+\sqrt[n]{n}}{n} \end{equation} I do not know where to start! Thank you very much I want to write all zeros to my hard drive, so I can re-install windows 7 Validity of conditional statement when the premise is false.