i am trying to force some change  on an input button with inline style. I use the html  function of jQuery. It works the first time when i click on the + button, but not working when i click on the - button  &lt;div id='div_bouton_moins'&gt;&lt;input type=button  value='-' id='bouton_moins' style='background-color:green !important'&gt;&lt;/div&gt; &lt;div id='div_bouton_plus'&gt;&lt;input type=button  value='+' id='bouton_plus' style='background-color:red !important'&gt;&lt;/div&gt;   $('#bouton_moins').click(function(){  $('#div_bouton_plus').html("&lt;input type=button  value='+' id='bouton_plus' style='background-color:red !important'&gt;") $('#div_bouton_moins').html("&lt;input type=button  value='-' id='bouton_plus' style='background-color:green !important'&gt;"); });   $('#bouton_plus').click(function(){  $('#div_bouton_plus').html("&lt;input type=button  value='+' id='bouton_plus' style='background-color:green !important'&gt;"); $('#div_bouton_moins').html("&lt;input type=button  value='-' id='bouton_plus' style='background-color:red !important'&gt;");   });     thanks all
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.
I have a raster image (Sentinel-2 band 4) and a shapefile covering the same area than the image (same projection and extension). The shapefile has different polygons which are agricultural fields.   I want to create a new file where, for each polygon, the mean value of the pixels that are inside it is calculated.  Could you please help me to find an appropriate R code for that? I obtained a licence key for Windows 8 through DreamSpark. Is there a way to download a Windows 8 ISO image like you could for Windows 7? I am on a non-Windows machine, so I cannot use the Secure Download Manager to download Windows 8 directly using DreamSpark. Where can you ask about Career Advice? The  specifically says not to ask  for career advice but people do it anyway.  Should I consider the Help Center outdated or only loosely enforced?    And what about a career advice site on the network?  There are 70+ sites, and most of them are for relatively narrow interests (which is not a criticism, I enjoy looking through the many sections).  A career section seems like it would be very popular.  Also, a careers section would help keep career questions off the other sites. Find a value anywhere in a database Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it? Can I enter Croatia with single entry visa Schengen? Is it possible to take screenshots on the 3DS? In Pokemon X and Y there are specific locations in the game that allows you to save what are essentially 3D screenshots from the upper screen using a virtual camera. This made me wonder - is it possible to take screenshots, 3D or otherwise, from within the 3DS? How do I suppress stderr warning messages from a command inside command substitution? touch ~/deleted/$(echo "directory_"$(readlink -f foo)|tr '/' '\') 2&gt; /dev/null   where foo is a directory  It's reading the full pathname of foo and creating it as a file replacing all '/' with '\' and putting a directory_ in front so the directory  /home/test/foo would create a file directory_\home\test\foo  It does exactly what I want except a warning keeps printing tr: warning: an unescaped backslash at end of string is not portable   a. I don't know what that means b. I would like it to not show  I tried to redirect stderr to /dev/null but it doesn't work. How do I suppress it? How do I get an animated gif to work in WPF? What control type should I use - Image, MediaElement, etc.? Seeking open source solution to access rasters in File Geodatabase? I'm looking for a way to access raster layers in an Esri File-GeoDatabase without using ArcObjects or ArcPy, specifically I would like to access the raster layers with GDAL. I understand that the GDAL FileGDB and OpenFileGDB give access to vector datasets within File-GeoDatabases, and that ESRI's own FileGDB C++ API does not support raster access.   Is anyone out there aware of any open source solutions? Is it possible to prevent DHCP service on SBS 2003 from shutting down due to rogue DHCP server? CUDA writing to constant memory wrong value Similar matrices and field extensions Difference between logit and probit models How do I determine whether or not two lines intersect, and if they do, at what x,y point? Why there isn't a feature that lets any user on SO to request other user to answer their question? When I browse through other questions to find my answer, sometimes I'll find answers similar to what I'm looking for, and though they don't exactly answer my question, the author might be able to do so. Could we have a feature on SO that will let me request that another user answer my question, in case I find someone who could potentially answer my question? Would you please tell me which of the following terms is correct? If both are correct, are they equal?     I have no [...] I don't have any [...] How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see &quot;&quot; in the . Trajectory of a photon around a Schwarzschild black hole? Consider a photon coming from the infinity in a unbounded orbit to a Schwarzschild black hole (Schwarzschild radius $r_{s}$) (see  for illustration). Its impact parameter is $b$ and its distance of closest approach is $r_{0}$ with $$b^2=\frac{r_{0}^{3}}{r_{0}-r_{s}}$$.  Then its trajectory in polar coordinates is defined by :  $$\frac{d\varphi}{dr} = \frac{1}{r^2\sqrt{\frac{1}{b^2}-\left(1-\frac{r_s}{r}\right)\frac{1}{r^2}}}$$  Consequently : $$\varphi\left(r\right) = \int_{r_{0}}^{r} \frac{dp}{p^2\sqrt{\frac{1}{b^2}-\left(1-\frac{r_s}{p}\right)\frac{1}{p^2}}}$$  and one can compute the total deviation using :  $\Delta\varphi = 2\times\left(\lim_{r\to+\infty}\varphi\left(r\right)-\frac{\pi}{2}\right)$  But my question is : how can I plot/draw the trajectory using the integral expression of $\varphi\left(r\right)$ ?    Because if I compute : $$f\left(r\right) = 2\times\left(\int_{r_{0}}^{r} \frac{dp}{p^2\sqrt{\frac{1}{b^2}-\left(1-\frac{r_s}{p}\right)\frac{1}{p^2}}}-\frac{\pi}{2}\right)$$ I obtain $f\left(r_{0}\right) = -\pi$, and then $f$ increases up to zero, crosses zero, and tends to its positive value at infinity $\Delta\varphi$. It does not make sense for me and I do not understand how to compute the trajectory from that.    If I compute : $$g\left(r\right) = \int_{r_{0}}^{r} \frac{dp}{p^2\sqrt{\frac{1}{b^2}-\left(1-\frac{r_s}{p}\right)\frac{1}{p^2}}}$$ it starts from $0$, and increase up to $\frac{\pi}{2}+\frac{\Delta\varphi}{2}$.    I would like to compute the trajectory in the $\left(x, y\right)$ plane, so how to use the values of $f\left(r\right)$ or $g\left(r\right)$ to compute the function $y\left(x\right)$ ? How to remove old device from Safari iCloud Tabs? I returned a MacBook to Apple Store, however apparently I forgot to sign out of iCloud and the latest tabs I was browsing still appear in Safari iCloud Tabs of my new MacBook and existing iPad.  I removed the device from icloud.com -> Find My iPhone but it didn't work. Tabs list from my old computer is still there and I am trying to remove it from my devices list. I appreciate any ideas.