jquery event on dynmically created table row I have a code which has buttons to add and delete rows. I want to change the background as soon as mouse enters the table and back to normal when it leaves the table. I checked all the solutions on stackoverflow nothing is working for me.    Here is my html code for the table:   &lt;/html&gt;  &lt;body&gt;  &lt;div class="wrapper"&gt;  &lt;table align='center' cellspacing=2 cellpadding=5 id="data_table" border=1&gt;   &lt;tr&gt;  &lt;th&gt;First Name&lt;/th&gt;  &lt;th&gt;Last name&lt;/th&gt;  &lt;th&gt;Email&lt;/th&gt;  &lt;th&gt;Telephone&lt;/th&gt;  &lt;/tr&gt;  &lt;tr id="row1"&gt; &lt;td id="fname_row1"&gt;&lt;input type='text' name='first_name'&gt;&lt;/td&gt; &lt;td id="lname_row1"&gt;&lt;input type='text' name='last_name'&gt;&lt;/td&gt; &lt;td id="emial_row1"&gt;&lt;input type='text' name='email'&gt;&lt;/td&gt; &lt;td id="telephone_row1"&gt;&lt;input type='text' name='telephone'&gt;&lt;/td&gt;  &lt;td&gt; &lt;input type="button" value="Delete" class="delete"  onclick="delete_row('1')"&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr id="row2"&gt; &lt;td id="fname_row2"&gt;&lt;input type='text' name='first_name'&gt;&lt;/td&gt; &lt;td id="lname_row2"&gt;&lt;input type='text' name='last_name'&gt;&lt;/td&gt;  &lt;td id="email_row2"&gt;&lt;input type='text' name='email'&gt;&lt;/td&gt; &lt;td id="telephone_row2"&gt;&lt;input type='text' name='telephone'&gt;&lt;/td&gt;  &lt;td&gt; &lt;input type="button" value="Delete" class="delete"  onclick="delete_row('2')"&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr id="row3"&gt; &lt;td id="fname_row3"&gt;&lt;input type='text' name='first_name'&gt;&lt;/td&gt; &lt;td id="lname_row3"&gt;&lt;input type='text' name='last_name'&gt;&lt;/td&gt; &lt;td id="email_row3"&gt;&lt;input type='text' name='email'&gt;&lt;/td&gt; &lt;td id="telephone_row3"&gt;&lt;input type='text' name='telephone'&gt;&lt;/td&gt;  &lt;td&gt; &lt;input type="button" value="Delete" class="delete"  onclick="delete_row('3')"&gt; &lt;/td&gt; &lt;/tr&gt;   &lt;tr&gt; &lt;td&gt;&lt;input type="text" id="new_fname"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="new_lname"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="new_email"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="new_telephone"&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="button" class="add" onclick="add_row();" value="Add Row"  style="float:center;"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt;  &lt;/body&gt; &lt;/html&gt;   And here is my script code:   $(document).ready(function()  {    $(".wrapper").on("mouseenter","td", function() {     $("input[type=text]").css("background-color", "lightblue");     }).on("mouseleave","td", function() {          $("input[type=text]").css("background-color", "");          });   });  function delete_row(no) {  document.getElementById("row"+no+"").outerHTML=""; };  function add_row() {  var new_fname=document.getElementById("new_fname").value;  var new_lname=document.getElementById("new_lname").value;  var new_email=document.getElementById("new_email").value;  var new_telephone=document.getElementById("new_telephone").value;    var table=document.getElementById("data_table");  var table_len=(table.rows.length)-1;  var row = table.insertRow(table_len).outerHTML="&lt;tr id='row"+table_len+"'&gt;  &lt;td id='fname_row"+table_len+"'&gt;"+new_fname+"&lt;input type='text'   name='first_name'&gt;&lt;/td&gt;&lt;td id='lname_row"+table_len+"'&gt;"+new_lname+"&lt;input   type='text' name='last_name'&gt;&lt;/td&gt;&lt;td   id='email_row"+table_len+"'&gt;"+new_email+"&lt;input type='text' name='email'&gt;  &lt;/td&gt;&lt;td id='telephone_row"+table_len+"'&gt;"+new_telephone+"&lt;input   type='text' name='telephone'&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='button' value='Delete'   class='delete' onclick='delete_row("+table_len+")'&gt;&lt;/td&gt;&lt;/tr&gt;";   document.getElementById("new_fname").value="";  document.getElementById("new_lname").value="";  document.getElementById("new_email").value="";  document.getElementById("new_telephone").value=""; };   And thank you
Event binding on dynamically created elements? 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.
Short story about aliens who want to trade items for information, stories, jokes etc package makeidx: print first letter for each group of keys I've created index with makeidx package. It works. What really need is to print the first letter above every group of keys (i.e. referring to the image I want to print the red letter, that I have manually inserted). Passing custom string into a Salesforce email template. Equal simple field extensions? I have a question about simple field extensions.  For a field $F$, if $[F(a):F]$ is odd, then why is $F(a)=F(a^2)$? How do I install OpenStack? How do I install ? Is there an easier way other than official installation instructions? "Nikki's and Alice's X" vs. "Nikki and Alice's X" Emoji Characters I'm trying to display Emoji Characters inside my XeLaTeX Document. It seems to work for some glyphs like the numbers and pound sign but not for all. Here is a MWE:  \documentclass{scrartcl}  \usepackage{fontspec}  \setmainfont{Apple Color Emoji} % The emoji Font   \begin{document} \char"0030{}  %Works \char"1F60D{} % Doesent Work should out put SMILEY FACE WITH HEART SHAPED EYES \end{document}   What is the reason for this strange behavior and is there a way to include Emojis in XeLaTeX?  Edit:   It seems the Character is there. It is selectable but not visible. I can copy&amp;paste it. The earth is not a sphere, because it bulges at the equator.   I tried fiddling with centripetal force equations and gravity, but I couldn't derive why this bulge occurs.    Is there   (a) a mathematical explanation using forces (not energies) and   (b) a simple intuitive explanation to explain to others why the bulge occurs? This is similar to , but I believe it's a bit different*.  Sites like GMail support a preference that pushes all traffic through the SSL edition of the site rather than the plain-text protocol.   For sites that don't offer such preferences (or ones that may, but I have been unable to find, like facebook), is there a way using only the browser (perhaps with a plugin or addon) to always try SSL first, and fall-back to plain-text iff SSL fails?  Is that solution available on Windows, Mac OS X, and Linux? Just one?     * The previous question was looking for external applications that would accomplish this goal. The book "A First Course in Abstract Algebra" by Fraleigh says      If $G$ is a finite subgroup of the multiplicative group $\langle F^*,\cdot\rangle$ of a field $F$, then $G$ is cyclic. In particular, the multiplicative group of all nonzero elements of a finite field is cyclic.    I wonder why that is. Take $a,b\in F$ such that $a^2=b^2=1$. Then $\{1,a,b,ab\}$ is a non-cyclic subgroup of $F$. Where am I going wrong?  Thanks in advance! Kinetic energy is simple, right?! from the equation it seems as though if you know the speed and mass you'll know the work. Let's try to prove it. let's assume we know the acceleration and distance for now. $$w=mda$$ So the distance is $$d= 1/2 *at^2$$ Then  $$t = \sqrt{2d/a}$$ So $a*t$, which is the speed, is  $$a*\sqrt{2d/a} = a* \sqrt{2d}/\sqrt{a} = \sqrt{2da} = \sqrt{2w/m}$$ So regardless of the distance or acceleration, if you know the work and the mass, you can calculate the speed which is  $$v=\sqrt{2w/m}$$  What if you know the speed and the mass? You can easily calculate the work. $$v = \sqrt{2w/m}$$ Then  $$v^2 = 2w/m$$  That would mean  $$m*1/2*v^2=W $$ Rearrange it and  $$W= 1/2 *m *v^2$$ would be the equation.  What if you have an initial speed and a new speed and want calculate the amount of work done after an initial speed to get the new speed? You'll just subtract the total work from the initial speeds work.  $$1/2mv^2 - 1/2ms^2$$  where s is  the initial speed and v is the new speed. However if you do it the other way which is  $$d= 1/2at^2 + vt$$ and solve it the answer would be $$1/2ms^2  + 1/2msv$$ Why aren't they equal? Passing named arguments to shell scripts Is there any easy way to pass (receive) named parameters to a shell script?  For example,   my_script -p_out '/some/path' -arg_1 '5'   And inside my_script.sh receive them as:  # I believe this notation does not work, but is there anything close to it? p_out=$ARGUMENTS['p_out'] arg1=$ARGUMENTS['arg_1']  printf "The Argument p_out is %s" "$p_out" printf "The Argument arg_1 is %s" "$arg1"   Is this possible in Bash or Zsh? I have some non-Gaussian distributed variable and I need to check if there are significant differences between the values of this variable in 5 different groups.  I have performed Kruskal-Wallis one-way analysis of variance (which came up significant) and after that I had to check which groups were significantly different. Since the groups are kind of sorted (the values of the variable in the first group are supposed to be lower than the values of the variable in the second group which are supposed to be lower than the values of the variable in the third group and so on) I only performed 4 tests:  Group 1 vs Group 2 Group 2 vs Group 3 Group 3 vs Group 4 Group 4 vs Group 5   I have performed this analysis with two different methods. I started by using Dunn's Multiple Comparison Test but nothing came up significant. On the other hand if I use Mann-Whitney test and correct for the number of tests (4) using Bonferroni, 3 tests come up significant.  What does it mean? Which results should I trust? I've been riding a mountain bike for years, but I prefer to go longer distances on paved ground, so I think a road bike would be better. When I ask what is a good bike, I don't need brands or models - more like what components of the bike should I look for, and what should I avoid? Additionally, is it necessary to "go big or don't go at all" as far as spending - getting a real good quality road bike for $500 to a few thousand, or should I cheap out on a $100-200 road bike, as it is my first, then get a better one when I'm more experienced? Construct a command by putting a string into a tty OS: UBUNTU 18.04  I had installed Oracle Java 8 earlier. But decided to switch to open JDK 11. it's successfully installed. java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3) OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)  Then I set the JAVA_HOME sudo nano /etc/environment  File changes: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/$ JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"  Then executed: source /etc/environment  echo $JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/  But the moment I exit the terminal and then launch the terminal again: I get this output:  ▶ echo $JAVA_HOME /usr/lib/jvm/java-8-oracle  which you can see is not what is expected. Please help me out Can I travel to Paris for a day with a single entry visa for Schengen from Switzerland? $f:I=[\pi,2\pi]\to \mathbb{R}^2$ be given by $f(t)=(\cos t,\sin t)$  which of the following are necessarily correct?  $1$. $\exists t_0\in I$ such that $f'(t_0)=\frac{1}{\pi}(f(2\pi)-f(\pi))$  $2$. $\nexists t_0\in I$ such that $f'(t_0)=\frac{1}{\pi}(f(2\pi)-f(\pi))$  $3$.$\exists t_0\in I$ such that $\pi||f'(t_0)||\ge ||(f(2\pi)-f(\pi)||$  $4$. $f'(t)=(-\sin t,\cos t)\forall t$  $4$ is clearly true, $1$ is true by Mean Value Theorem as $f$  satisfies all the conditions of MVT? have no idea of $2$ and $3$, Thank you for help Why did the Ministry of Magic choose an ax for carrying out a death sentence? How can I pass a class member function as a callback? I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager-&gt;Init(this-&gt;RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&amp;CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &amp;CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!