I have some javascript / jquery to clone a table with some input files and a button. After cloning the button doesn't seem to work anymore when it has the same class.   The situation: When you click the add product, a row will be copied under the last row, so that a user can add an other product to the option. Here's an example:    There's an other button beneath those products: Create option. This button clones the first table (Option) and past it under the button. But after it has been copied, the button 'Add Product' doesnt seem to work anymore   I don't have any errors, so I don't know what I am doing wrong.   This is the code that I'm using to clone the tables:  &lt;script type="text/javascript"&gt; $(document).ready(function () {     $('.addproduct').click(function (e) {         // Clone a product and add it to the option.         e.preventDefault();         var item = document.getElementById('hiddenTemplate').cloneNode(true);         $('#hiddenTemplate').before(item);         $(item).removeAttr('id');      });     $('.addOption').click(function (e){         // Create a new option         e.preventDefault();         var item = document.getElementById('hiddenOption').cloneNode(true);         $('.newOption').append(item);         $(item).removeAttr('id');         $(item).addClass('tableOptions');     }); });     Could some1 explain to me what I'm doing and what might be an solution? My code isn't prefect atm i think and I'm open for learning!  Happy Coding!
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'm having trouble figuring out how to iterate over map layers. I can access the currently highlighted layer in the table of contents via iface.activeLayer() but I want my code to operate on all layers.  I don't see anything in the API that provides easy access to this functionality and couldn't find a good online example but maybe I missed something? ffmpeg - Create a video from image frame with a start and a count I have a process I can't kill with kill -9 &lt;pid&gt;. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option. Disable the numbering of algorithms My problem is that I do not know how to disable the numbering for algorithms. I have created an algoritm and its number is "Algorithm 1", but I want to have "Algorithm".  \documentclass{article}  \usepackage[noend]{algorithmic}  % Hide endif .etc  \usepackage{algorithm}  \algsetup{indent=2em}  % Default 1 em  \renewcommand{\algorithmiccomment}[1]{\hspace{2em}// #1}  % Change to C-style comments, though still ugly  \begin{document} \begin{algorithm}     \caption{MyAlgorithm} \label{alg:MyAlgorithm}     \begin{algorithmic}[1]     % Default no line numbering        \end{algorithmic} \end{algorithm}  \end{document} I replaced a buggy Windows Vista installation with Ubuntu. All works fine except that the main HD where I had all my files are now inaccessible. Here is the error message I get:   Error mounting: mount exited with exit code 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error Failed to read NTFS $Bitmap: Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details   Is it necessarily a hardware problem? If not, is there a way to repair the HD from Ubuntu? I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.  This way:  export PATH=~/opt/bin:$PATH   or this?    export PATH=$PATH:~/opt/bin Will an iOS reinstall make a jailbroken iOS device "unjailbroken" and “supported by Apple” again? Will an    Work on any jailbroken-iPhone and Make a jailbroken-iPhone "unjailbroken"? Make a jailbroken-iPhone "supported by Apple"?   Similarly, does such an iOS reinstall reset the iPhone (jailbroken or not) back to a "clean, factory default" state?  My near-term purpose: I have an iPhone 4S running iOS 5.1 I'd like to jailbreak to at least install better Google Voice integration like . Let $n \geq 1$ be an odd integer. Show that $D_{2n}\cong \mathbb{Z}_2 \times D_n$. Let $n \geq 1$ be an odd integer. Show that $D_{2n}\cong \mathbb{Z}_2 \times D_n$. I define a map $$\phi:D_{2n} \rightarrow \mathbb{Z}_2 \times D_n$$ by $R \mapsto (0,r^{\frac{n+1}{2}})$ and $M \mapsto(1,m)$. Then I am stuck at showing the map is bijective. By the way, do we need to show that $(0,r^{\frac{n+1}{2}})(1,m)(0,r^{\frac{n+1}{2}})^{-1}=(1,m)$ ? If we can prove this, then what can we conclude? Same e-mail user, different address? Characterization convex function. Is it worth it to buy an FD-EOS adapter, or is it better to exchange a misbought lens? I recently bought a manual-focus (since manual doesn't bother me) . However, I didn't notice at the time of purchase that it was an FD lens. (I'm a hobbyist; I didn't know Canon had actually changed lens mounts at some point.)  On the one hand, I kind of want to experiment with this guy. And quality FD lenses are relatively cheap on the used market, so if the adapters were worth it, I could probably get more (and more varied) glass. On the other hand, everything I read about the FD-EOS adapters is highly contradictory. As in, some people swear by them, and others think they're outright tripe.  I am still within the exchange period, and can easily exchange this lens for this  that I'd been tossing up about buying anyway, as they are the same price.  Which would be the wiser choice? What happened to Charles Xavier after X-Men 3? I remember watching X-Men 3 and seeing Charles Xavier get disintegrated by Phoenix, however the post-credits scene and his appearance in later movies indicate that he actually survived. How is that possible? Intervals are connected and the only connected sets in $\mathbb{R}$ As the topic, prove that Intervals are connected and only connected  in $\mathbb{R}$. I know what is the definition of connected set. But not sure how to prove that. Looking to achieve frame effect with shadows at corners Why is $ the default symbol for a user shell and # the default symbol for a root shell? Operating a standard bash shell on a server, the PS1 prompt defaults to ending in a $ for non-root users, and # for root.  IE:  ubuntu@server:~$ sudo su root@server:/home/ubuntu#   Why is this? Prevent questions with movie/tv shows/game spoilers from appearing in the hot questions list I've noticed that occasionally "hot questions" from SciFi and the Movies &amp; TV network contain major spoilers about the movie/show discussed.  The Matrix spoilers:      (just now there's something about Cypher betraying Morpheus in the Matrix, which is a big deal for people who haven't seen the movie).   I like browsing through those but fear that one day one of these questions will spoil a show I'm excited about and yet to finish   Breaking Bad spoilers:      (like the finale of Breaking Bad, imagine a question asking why did one character betray another at the end or something).   Can users posting such questions be asked to label those with a tag (such as 'spoilers') and then somehow have the network hide those from the "hot questions" list? Or possibly format them differently?  Similarly, this could apply to the Arcade network too.  P.S. Love how this question spikes in popularity around the time GoT starts running again. I swear it should be fairly simple technically to ban questions that have a tag that says 'spoilers' from appearing in the Hot Network Questions.  P.P.S. Oh, and with every fresh release of Star Wars (The Last Jedi being the most recent one)!  P.P.P.S. Another year, another Game of Thrones, another spike in popularity! Who is the Community user? I see the  on the user page.  It seems to edit posts sometimes.  What is it? And why has it downvoted over 1800 times? See also: What's the most efficient way to get experience? Now that experience does something besides render regions of a server uninhabitable due to  orb lag, what's the most efficient and safe way to get those excellent enchants?  A mob farmer may rank highly, but what about without tons of setup? Why is the edit button disabled? I need to find a bottleneck and need to accurately as possible measure time.  Is the following code snippet the best way to measure the performance?  DateTime startTime = DateTime.Now;  // Some execution process  DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime);