I've got some jQuery that I'm using to change a class of two elements. It works once, and the elements change class once, but I want it to work interchangeably. so when they click they click the 'deselected' button it assigns itself the 'selected' class, and the 2nd button changes to a 'deselected' class. Here's the jQuery:    $('.network_bar_deselected').on('click', function(){     $('.network_bar_selected').removeClass('network_bar_selected').addClass('network_bar_deselected');     $(this).removeClass('network_bar_deselected').addClass('network_bar_selected'); });   and the HTML is quite simple:  &lt;a href="#"&gt;&lt;div class="network_bar_selected"&gt;&lt;h4&gt;Network Updates&lt;/h4&gt;&lt;/div&gt;&lt;/a&gt; &lt;a href="#"&gt;&lt;div class="network_bar_deselected"&gt;&lt;h4&gt;Latest Tweets&lt;/h4&gt;&lt;/div&gt;&lt;/a&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.
Why does 'g' sometimes read as 'j'? Most words with 'g' read as 'g'   Geek Goose Goods Goal   But sometimes 'g' reads as 'j'   Gymnastics Genesis Genius Genetic   And in the middle of a sentence, compare:   Log Logistics   Or   Frag Fragile Sum of principal minors Cannot find hard drives after installing Ubuntu 13.10 Configuring ADB for Nexus 4 on Ubuntu 11.10 I'm trying to deploy and test an Android app on my Nexus 4 from my Ubuntu 11.10 computer, but ADB doesn't recognize it. I think I need the Google USB drivers, but I cannot find instructions on how to install them on Ubuntu.  How can I install the drivers on Ubuntu 11.10 so that ADB will recognize my N4? For the Fibonacci numbers, show for all $n$: $F_1^2+F_2^2+\dots+F_n^2=F_nF_{n+1}$ The definition of a Fibonacci number is as follows:  $$F_0=0\\F_1=1\\F_n=F_{n-1}+F_{n-2}\text{ for } n\geq 2$$   Prove the given property of the Fibonacci numbers for all n greater than or equal to 1. $$F_1^2+F_2^2+\dots+F_n^2=F_nF_{n+1}$$  I am pretty sure I should use weak induction to solve this. My professor got me used to solving it in the following format, which I would like to use because it help me map everything out...  This is what I have so far:  Base Case: Solve for $F_0$ and $F_1$ for the following function: $F_nF_{n+1}$.  Inductive Hypothesis:  What I need to show: I need to show $F_{n+1}F_{n+1+1}$ will satisfy the given property. Proof Proper:  (didn't get to it yet)  Any intro. tips and pointers? Please don't throw this one out as a duplicate of  I'm not asking about the plurality of the noun immediately following those two words - I'm interested in exactly why the example below is problematic (context: I have several children, one named John)...     1: One of my children's name is John.   I can't see any obvious reason why singular name there is completely unacceptable, but it certainly doesn't sit well with me. It seems to turn on whether one of my children can be treated collectively as the "subject" of the Saxon genitive 's, but I don't see a problem with...     2: It's actually one of my children's, but you can sleep in this bed.   I realise that in practice we'd normally pluralise names in the first example. But of course, this implies that one of attaches to my children's names, which isn't really the same construction.  So - is there some kind of "rule, principle" debarring #1 above? Or is it just "one of those things"?    (Apologies if my later switch from brothers to children invalidates any comments or answers.) how do you make commands not show up on the chat I am making a server, and I put a comparitor clock down to constantly have clear weather. How do I silence the commands? Why does everything spin? The origin of spin is some what a puzzle to me, everything spin from galaxies to planets to weather to electrons.  Where has all the angular momentum come from? Why is it so natural?  I was also thinking do photons spin? we always think of the wave as a standard 2d sin wave but could this rotate in 3d? What implications would this have?   And what about spacetime how does all the spinning effect?  This has always been avoided in all lectures and classes I ever went to. Test whether a glob has any matches in bash How can I remove duplicate icons for "launched" java programs in the launcher? When launching java programs (like IntelliJ IDEA and Crashplan) in Natty's Unity launcher, duplicate icons are shown (see image).  For IntelliJ I created the .desktop file, for Crashplan the .desktop file is supplied with the application.  Is there something that can be changed in the .desktop files (or somewhere else) that can prevent this from occurring?  I couldn't find a bug report for unity itself but programs like Gnome-Do/Docky have   and had to make internal changes to their applications to prevent this.   In this image the 1st icon is the one created from the .desktop file and the second icon is after launching it.  Second icon disappears when closing the application.  Custom IntelliJ .desktop file  #!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=/opt/idea/bin/idea128.png Name[en_US]=IntelliJ IDEA Exec=/opt/idea/bin/idea.sh Name=IntelliJ IDEA Icon=/opt/idea/bin/idea128.png StartupNotify=true   Crashplan provide .desktop file  [Desktop Entry] Version=1.0 Encoding=UTF-8 Name=CrashPlan Categories=; Comment=CrashPlan Desktop UI Comment[en_CA]=CrashPlan Desktop UI Exec=/usr/local/crashplan/bin/CrashPlanDesktop Icon=/usr/local/crashplan/skin/icon_app_64x64.png Hidden=false Terminal=false Type=Application GenericName[en_CA]= In java SSL over https without certificate How to prove the property of the Lemoine point of a triangle? From Wolfram , I know there is a Lemoine point of triangle, also called symmedian point, the sum of squared distances of this point to all the three sides is algebraically minimum.    How to prove such a property? How to make tr aware of non-ascii(unicode) characters? I'm trying to remove some characters from file(UTF-8). I'm using tr for this purpose:   tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat    File contains some foreign characters (like "Латвийская" or "àé"). tr doesn't seem to understand them: it treats them as non-alpha and removes too.  I've tried changing some of my locale settings:  LC_CTYPE=C LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=C tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat LC_CTYPE=ru_RU.UTF-8 LC_COLLATE=ru_RU.UTF-8 tr -cs '[[:alpha:][:space:]]' ' ' &lt;testdata.dat   Unfortunately, none of these worked.  How can I make tr understand Unicode? Let $f$ be an entire function with $|f(z)|\le 100\log|z|,\forall |z|\ge 2,f(i)=2i, \text{ Then} f(1)=?$  I have no idea how to solve this one!  $g(z)={f(z)\over \log|z|}$ Then Can I say $g$ is constant by Liouville Theorem? How do I log all input and output in a terminal session? How do I keep logs of all the work done via terminal? For example, I want a record of all the work done on database via terminal. Who was/were the first Jedi? Prove by induction. How do I prove $\sum\limits_{i=0}^n2^i=2^{n+1}-1$ with induction? How to get straight quotation marks? How do I get straight quotation marks, i.e., " and ' in TeX?  (No, \verb changes the font and this is unacceptable.)  [Edit]  I forgot to mention that I’m using XeLaTeX, and fontspec is a necessity.  The first two proposed answers did work, without fontspec. How do I unlock privacy in multiplayer modes mission settings? A good reference on optimal control theory Ok, so I am reading about decision making and I came across this subject. Fortunately it has a  , but the point is I want to see some examples, and learn to solve regular problems of this field. Of course I can go for the book by Pontryagin but then I don't think that would be an educative book. Does anyone has a suggestion? I would be happy if it also covers LQ problems. P.S. I studied math, therefore I appreciate a book with rigorous approach to the subject.