I want to use .on on dynamically created elements... Although its not working, and yes I am using a selector :)  $(".metadata").on("click", "i.icon-remove", function () {     console.log("what");     $(this).parent(".metadata").slideUp(function () { $(this).remove(); }); });   This works perfectly for existing content, but not for anything thats dynamically created.  Both initial and dynamic content use the exact same creation method so I know their signatures are the same, any ideas?  Here is my HTML as it stands, the first item is present in the HTML, the second is dynamically created  &lt;div class="metadata"&gt;     &lt;input type="text" value="" style="width: 200px;"&gt;     &lt;i class="icon-remove"&gt;&lt;/i&gt; &lt;/div&gt; &lt;div class="metadata" style=""&gt;     &lt;input type="text" maxlength="100" style="width: 200px;"&gt;     &lt;i class="icon-remove"&gt;&lt;/i&gt; &lt;/div&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.
Jquery validation not working with ckeditor Clipping Rasters with a mask layer error I've got a NDVI layer that I'm trying to clip with a vector file but when I try and use GDAL Tools clipper I get an error.  That shows up like this:  What am I doing wrong?  This is before I even pick the mask layer!  Traceback (most recent call last):   File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\widgetPluginBase.py", line 28, in someValueChanged     self.emit(SIGNAL("valuesChanged(const QStringList &amp;)"), self.getArguments())   File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 105, in getArguments     return self.getArgsModeMask()   File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 143, in getArgsModeMask     if self.alphaBandCheck.isChecked(): TypeError: 'sip.methoddescriptor' object is not callable  Python version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]  QGIS version: 1.7.3-Wroclaw Wroclaw, 00624b3  Python path: ['C:\Users\dean.walker\.qgis\python\plugins\GeoCoding', 'C:\Users\dean.walker\.qgis\python\plugins\GeoCoding', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python', 'C:/Users/dean.walker/.qgis/python', 'C:/Users/dean.walker/.qgis/python/plugins', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QUANTU~1\bin\python25.zip', 'C:\PROGRA~1\QUANTU~1\apps\Python25\DLLs', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\plat-win', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\lib-tk', 'C:\PROGRA~1\QUANTU~1\apps\qgis\bin', 'C:\PROGRA~1\QUANTU~1\apps\Python25', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\wx-2.8-msw-unicode', '/usr/share/qgis/python', 'C:\PROGRA~1\QUANTU~1\apps\qgis\python\plugins\fTools\tools'] How to smooth camera animation to have fluid feel? When dealing with camera motion, its very sensitive to any movement discontinuities. Is there a way to easily achieve natural looking motion when dealing with complicated motion paths and timings?  Follow path animation feels too robotic unless I adjust all the keyframe easings carefully and this has to be re-done everytime the animation changes (the automatic bezier type just doesn't work). I've taken multivariate calculus and am wondering if I can see a specific function where the order of taking the partial derivative matters. I've been told that there are some exceptions where $ \dfrac{\partial ^2 f}{\partial x \partial y} \ne \dfrac{\partial ^2 f}{\partial y \partial x} $, so I'm curious to see what this looks like.  EDIT: And why would this true? Convert a list to a string in C# Does an adjective or longer modifier apply to both nouns when they are joined with 'and' [or 'or']? Can you grab the blue shirts and socks?   Is the above sentence stating that both the shirts and the socks are blue? Or only the shirts?  At this stage, I am leaning towards the earlier (only the shirts) — though writing "Can you grab the blue shirts and blue socks?" seems redundant. Which is stronger, a rope without knots or a rope with knots? Suppose I have two identical ropes, one of which I manually tie some knots in. If I use them to hang clothes, which one is more durable?      Personally I think that rope with knots will be more durable, but I can't come up with a satisfactory reason. Divergence of $\sum\limits_{n=1}^{\infty} \frac{\cos(\log(n))}{n}$ What if I accidentally run command "chmod -R" on system directories (/, /etc, ...) I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back? Can I find the connected components of a graph using matrix operations on the graph's adjacency matrix? If I have an adjacency matrix for a graph, can I do a series of matrix operations on the adjacency matrix to find the connected components of the graph? Can I put 700c tires on rims made for 27 x 1.25"? What are these  error below ?  Package natbib Warning: Citation `Krishna2014' on page 16 undefined on input li ne 502.  [16 &lt;./figure/aks smr.png&gt;] [17] [18] ! Undefined control sequence. l.560 \Bibliography                    {figure/bib} Prove that $$\cos(\pi/11)+\cos(3\pi/11)+\cos(5\pi/11)+\cos(7\pi/11)+\cos(9\pi/11)=1/2$$ using Euler's formula.  Everything I tried has failed so far.  Here is one thing I tried, but obviously didn't work. $$\Re e \{e^{\frac{\pi}{11}i}(1+e^{\frac{2\pi}{11}i}+e^{\frac{4\pi}{11}i}+e^{\frac{6\pi}{11}i}+e^{\frac{8\pi}{11}i}) \}=\frac{1}{2}$$ $$\Re e \{e^{\frac{\pi}{11}i}(1+\sqrt[11]{e^{2\pi i}}+\sqrt[11]{e^{4\pi i}}+\sqrt[11]{e^{6\pi i}}+\sqrt[11]{e^{8\pi i}}) \}=\frac{1}{2}$$ $$\Re e \{e^{\frac{\pi}{11}i}(1+\sqrt[11]{1}+\sqrt[11]{1}+\sqrt[11]{1}+\sqrt[11]{1}) \}=\frac{1}{2}$$ $$\Re e \{5e^{\frac{\pi}{11}i} \}=\frac{1}{2}$$ $$5\cos(\frac{\pi}{11})=\frac{1}{2}$$ Which isn't true :D  Thanks in advance E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) I'm trying to run this command in the terminal:  sudo apt install software-properties-common   This is the error message I get:  E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)   E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),     is another process using it? Python: list items are not changed in for loop A non orientable closed surface cannot be embedded into $\mathbb{R}^3$ Word for person always after what he does not have and not cherishing what he has Possible Duplicate:          Is there a word for a person who is always after what he does not have and does not cherish what he has? If not, any idiom or phrase? Get the coordinates from ContourPlot and RegionPlot How to toggle Scroll Lock in Excel 2010 without a Scroll Lock key in the keyboard I have a notebook with no Scroll Lock key (or any shortcut using the 'Fn' key).  Somehow Excel 2010 got the Scroll Lock on. I see it left down in the status bar and now I can't navigate through cells using the arrow keys, which is pretty annoying. It wasn't turned on some hours ago, so I think I must have hit some Scroll Lock toggle shortcut in Excel 2010 by mistake.  Anyone knows what hot to turn off Scroll Lock in Excel (shortcut or menu option)? Below is an example from I.N. Herstein:       Let  $R=\Bigg\{\left( \begin{array}{ccc} a &amp; b \\ -b &amp; a \end{array} \right)\Bigg|a,b\in \mathbb R\Bigg\}$ and let $\mathbb C$ be the field of complex numbers. Define $\psi :R\to \mathbb C$ by $\psi\left( \begin{array}{ccc} a &amp; b \\ -b &amp; a \end{array} \right)=a+bi.$       It is asked to prove that $\psi$ is a ring isomorphism of $R$ onto $\mathbb C$ .    can anyone help me with some hint how to prove the ring isomorphism.