I have a element that append to body when user click on a button. I want to remove appended element by clicking on it. How can I  do this?     Code         $("#btn1").click(function() {       $("body").append("&lt;div class='someClass'&gt;&lt;/div&gt;");   });   $(".someClass").click(function() {       $(this).remove();   }); .someClass{   width:100px;   height:100px;   background:green; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;button id="btn1"&gt;append div&lt;/button&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.
My very simple Greasemonkey script is not running? I'm trying to show the following:  Let $f:X\to Y$ be a proper holomorphic map between connected, non-empty Riemann Surfaces. Show that a map $g:Y\to\mathbb{C}$ is  holomorphic if and only if  its composition with f is holomorphic.  So far I know that $f$ is surjective, since it's proper and holomorphic. My next step was to look at the charts, but it's there, I get stuck. Let $A$ be a ring with $0 \neq 1 $, which has $2^n-1$ invertible elements and less non-invertible elements. Prove that $A$ is a field. How to handle a deliberate duplicate question I got  question in review. First sentence is:     I know there is a  question, but no answers.   And indeed the two questions are virtually identical. I started to flag as duplicate - but the original question had no answer at the time, so it wouldn't be correct and apparently . (I didn't go so far as to try to submit the flag).  What is the proper action here? How do we want such a question to be handled? Should both (or more) questions stay open indefinitely until either is answered and somebody gets the good idea to do the duplicate linking?   As the new question is essentially a bump to the front page (perhaps with re-tagging), especially in the case where the OP knows that a previous question exist, perhaps something should be done to enable bumping re-emphasizing without writing the new question.  As I wrote this,  actually got an answer. So the old one should now be closed as a duplicate of the new - but my question remains for the case where all known/found duplicate questions have no answer?  Ironically, just before asking this, the "Questions that may already have your answer" gave me ... (Although the suggestion has no answer). So it has been asked before - the comment there even suggest the ability to re-emphasize. Novel about a teleportation device and a con artist alien I read two (maybe three) books about a protagonist who communicates with an alien who provides the instructions on how to create a device to teleport. The device is flawed in that it purposefully uses more energy (much more) by taking it from the rotation of the Earth.  The main character and two others continue to fight, commit intrigue, etc. The alien then uses them to recruit other races to do the same thing. How to use GCC 4.7 in place of 4.6? So I'm working on a project and I wanted to use some C11 features for C. To use those features GCC 4.7 is required, so I went to synaptic and looked up 4.7, and I found the packages gcc-4.7-base so I installed it[1].   So now that gcc-4.7-base is installed I expected to be able to use 4.7, but no, when I do gcc --version it still shows 4.6.3 even more, when I try to directly call 4.7(via /usr/bin/gcc-4.7) it doesn't exist, though a gcc-4.6 executable does exist.  How do I "activate" GCC 4.7? I read , you do some crazy stuff with update-alternatives, but it doesn't work for me as the gcc-4.7 executable doesn't actually exist on my machine.   Notes: 1. I also saw gcc-4.6-base, so I figured I'd uninstall it, but synaptic attempted to remove every package I had installed and install a Java runtime, so for obvious reason I decided not to remove it. A function that is continuous at the origin but not differentiable there Show that $f(x,y)=\dfrac{xy^2}{x^2+y^2}$ (with $(x,y)\not=(0,0)$ and $f(0,0)=0$) is continuous but not differentiable at $(0,0)$.  I tried to show continuity with an $\epsilon -\delta$ argument but I don't know how to factorize the expression so that I can have something useful.   For differentiability I think I should show that the partials are not continuous at $(0,0)$. But finding the partials is also painful. What happens to matter (e.g. bodily fluids) that are left on the holodeck? What happens when a black hole dies? Does it just vanish into space leaving nothing behind or does it expel some material?    Also, talking more about black holes, as far as I understand the term "temperature", it is defined by the amount of kinetic energy of the particles of a body and from what I have read, there are no particles inside a black hole, I know that you can find the temperature of a black hole by analyzing its Hawking radiation but I cant really understand how the term "temperature" can be applied to a black hole. Does it mean that whatever is that it is inside a black hole has kinetic energy? Have physicist already experienced the death of any regular black hole (by regular I mean space-sized black holes not micro ones created in labs)? Also, where is the Hawking radiation form? Because if it is released by the black hole I bet it must have formed outside the event horizon, but how exactly? I have a new HP Z800 Workstation, running Windows 7 Enterprise 64 bit. Z800 Specs are .  The machine has 4GB of RAM -- windows reported 1.99GB available, 2GB was "hardware reserved".  I added another 2 GB and windows reports that there is 6GB of physical RAM, but now 4GB is "hardware reserved".  The BIOS sees the full RAM amount as well.  The video card is an nVidia Quadro FX 580, so it shouldn't be using any shared memory at all.    Why is all my extra RAM marked as "hardware reserved" in Windows 7? Where's my Vox Populi badge? Possible Duplicate:          I was a very good boy yesterday, voting 40 times (and getting the message that told me to wait until the next day before voting again) on a good mix of questions and answers. But I didn't receive the Vox Populi badge for it. What gives? A toplogical space $X$ is said to be second countable   if there exists a countable basis for the topology.      $X$ is separable if there exist a countable dense subset.   Show that a second countable space always is separable.      Give an example of a space that is separable but not    second countable   The first part was easy and i managed to solve it on my own  Assume that $X$ is second countable and let $B_1, B_2, B_3...$ be a countable basis. Construct the set $A$ by taking one element $x_n$ out of every $B_n$. Then $A$ becomes dense because every open set $U$ contain a $B_n$ which in turn contain the element $x_n$ in $A$.    Again, like in the question i posted yesterday, i had trouble to come up with an example but our professor gave an example during the last lecture but i dont fully understand it:  "For an example of a separable but not second countable space let $X$ be the real line provided with the cofinite topology, i.e. where a set is open if its either empty or if its complement is finite.   Then every infinite set is dense and hence $X$ is separable.  But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  We asked him to explain it in more detail but his english is poor and nobody understood anything...:)       Def: A subset $A$ of a topological space $X$ is dense in $X$ if for any point $x$ in $X$, any neighborhood of $x$ contains at least one point from $A$.   $1.$ "Then every infinite set is dense"  Take $A$ to be one of these infinite sets. If $x \in A \subset X$ then it trivially fulfills the definition. But if we take a $x \not\in A$ why is it not possible to find a neighborhood in these finite sets that does not contain an element in $A$?  edit: its obvious if it is only open neighborhoods, open sets in the topology, but that is not specified in the definition.  $2.$ I am not fully understanding this either  "But for an arbitrary countable family of open sets $U_1, U_2...$ write $U_i = X$\ $A_i$, where $A_i$ is finite, there is an element $x \in X$\ $(\cup_i Ai)$, because $A_i$ is countable,  such that the open set $X$\ $\{x\}$ is then not able to contain any $U_i$. Consequently $X$ is not second countable."  Is it possible to express this in a simpler way? Passing list to viewparams variables in GeoServer SQL views? I have a sql view which take only one parameter, but this parameter is a list, and a need to know how can i pass this parameter in the url  Here is my sql view  SELECT * FROM shop WHERE id IN %list%   When I put the default value for %list% as (1, 2 ,3) as example, the layer preview works and show the shopa with the default ids,  but when I try this in the url  viewparams=list:(1,2,3)   does not work.   I already tried other things like   viewparams=list:"1,2,3"   but nothing works.  Does anyone know how to do this? Glossaries: Make a glossary entry recognizable in printing How do you make it visible to the reader that the printed word/term is an entry in the glossary? In my PDF on the computer, I just see it because I use the hyperref package and there's a red box around it. But when printing it, there's just nothing that makes it visible to the user.  Is there a typographically good and common way of doing this? Reversing the $T(n) = \frac{n(n+1)}{2}$ formula Can someone reverse this formula? Sorry if it's too basic, I'm an old guy and my math is rusty :-D  $s =\frac{n(n+1)}{2}$  If it ain't clear, by reverse I mean obtaining the value of n by providing s  Thanks I'd like to create a chart where the column titles are rotated, as per this toy example:    I used the rotating package to generate the above. It has certain shortcomings: the rotate command doesn't leave space for the titles, so I have to manually space things to prevent overlaps. The turn command, by contrast, creates too much space, where each column is the width of the entire rotated column title.  There is also no easy way to have long titles be split into multiple lines.  Is there a package for creating tables of this sort, or at least one that would relieve some of the manual placing and spacing that goes into creating such a table?    This question is more to make sure I don't miss any easy way of doing what I want than seeking help on manually doing it, but the code for above is included anyways:  \begin{tabular}{r|ccc} &amp; \begin{rotate}{60} Property 1 \end{rotate} &amp; \begin{rotate}{60} Property 2 \end{rotate} &amp; \begin{rotate}{60} Property 3 \end{rotate} \\ \hline System 1        &amp;       &amp;       &amp;  X    \\  System 2        &amp; X     &amp; X     &amp;  X    \\ System 3        &amp; X &amp;   &amp;  X    \\ \hline \end{tabular} Find the center of the symmetry group $S_n$.   Attempt:  By definition, the center is $Z(S_n) = \{ a \in S_n : ag = ga \forall\  g \in S_n\}$. Then we know the identity $e$ is in $S_n$ since there is always the trivial permutation. Suppose $a$ is in $S_n$, but not equal to identity. Now we can imagine the permutation as bijective function that maps from $\{1,2,\dotsc,n\}$ to $\{1,2,\dotsc,n\}$.  So suppose $p$ is a permutation map. Then $p$ maps from a location $i$ to a location $j$. Take $p(i) = j$ where $i\neq j$. Let $k$ be in $\{1,2,\dotsc,n\}$, where $k$, $i$ and $j$ are all different elements. The cycle $r = (jk)$, then we will see if this commutes.  $rp(i) = rj$    Can someone please help me, I am stuck?  Thank you. $\mathbb{Z}[X]/(X^2-1)$ is not isomorphic with $\mathbb{Z}\times \mathbb{Z}$ How to remove the Unity Amazon package in 16.04? I was able to go to the ubuntu software center before and remove it and now it doesn't show up since the switch to the gnome software store. Trying the terminal method of removing the shopping lens doesn't work in this release. A new environment based on enumerate I have defined the following simple environment:  \newenvironment{renumerate}{\begin{enumerate}\raggedright}{\end{enumerate}}   I wonder how the above can be modified to use with, say, the following:  \begin{renumerate}[label=\color{blue}10.\theenumi] \item blah \item blah \end{renumerate}   The options given in [] are not known in advance.