I have a click event on a checkbox button which I remove in my click event and I append it again with another value. My problem is the click event is not working anymore after the new append.  &lt;input class="year" type="checkbox" value="2015" /&gt; 2015 &lt;br&gt;   $(".year").click(function(){     $(".col-md-12").remove(); //i remove the div which contains the checkbox       $.ajax({         url: "criteria_search",                   type: 'POST',          data: {             criteria: "authors",              value: "test"          },         success: function(data) {              articles = $.parseJSON(data)             $("#AppendToElem").append(" &lt;div class=\"col-md-12\"&gt; &lt;h2&gt; Search Results &lt;\/h2&gt; &lt;p&gt; &lt;span&gt;There are&lt;\/span&gt; &lt;strong&gt;3974&lt;\/strong&gt; &lt;span&gt;results for:&lt;\/span&gt; &lt;strong&gt;Computer Animation and Virtual Worlds&lt;\/strong&gt; &lt;\/p&gt; &lt;p&gt; &lt;a class=\"btn\" href=\"#\"&gt;&lt;\/a&gt; &lt;\/p&gt; &lt;div class=\"row\"&gt; &lt;div class=\"col-md-3\"&gt; &lt;h3&gt; Filter List &lt;\/h3&gt; &lt;div class=\"form-group\"&gt; &lt;label for=\"exampleInputEmail1\"&gt; Year &lt;\/label&gt;&lt;br&gt;");                $.each(articles, function(index, jsonObject){                 $("#AppendToElem").append("&lt;input class=\"year\" type=\"checkbox\" value=" + jsonObject.date.date.substring(0, 4) + " /&gt; " + jsonObject.date.date.substring(0, 4) + "&lt;br&gt;")              });         )     }); });   And after I clicked on my checkbox the second time the click event is not handled. How can I fix this?
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 paper become translucent when smeared with oil but not (so much) with water? When I smear oil onto a scrap of paper and rub it in, the paper becomes quite translucent; but when I attempt the same with water it doesn't as much. Why? How to mount a virtual hard disk? Is it possible to mount a virtual hard disk (VHD, HDD, VDI, VMDK) on Ubuntu? How can this be done? UK Visa in an expired Nigerian passport - what to use? I am in Nigeria, my passport will expire in 4 months and I have a document to apply for a UK visiting Visa with that passport number.  Should I use it like that or go for another passport. If I choose to get another passport, how will I use it because of the passport number on the about to expired one in the document I want to use for Visa. Show $f$ is analytic if $f^8$ is analytic This is from Gamelin's book on Complex Analysis.  Problem: Show that if $f(z)$ is continuous on a domain $D$, and if $f(z)^8$ is analytic on $D$, then $f(z)$ is analytic on $D$. (I assume the intention is that $D$ is nice, i.e. open and connected)  I'm not exactly sure how to approach this. I'm guessing it has something to do with zeroes of $f$. For example, around non-zeroes, $f$ is analytic since $z^{1/8}$ is nonzero in a neighborhood. Or something along those lines. The details are eluding me.  Any help would be appreciated! How to execute two mysql queries as one in PHP/MYSQL? How to permanently set environmental variables I'm trying to make a basic Windows application that builds a string out of user input and then adds it to the clipboard. How do I copy a string to the clipboard using Python? Attorney at law, is there any other kind? I have wondered from time to time about the phrase "attorney at law." Are there other kinds of attorneys? Attorneys at arms? If not, why do we specify? Rank of a Matrix Sum I have $3\times3$ matrices such that S=A+B. I know there is an inequality connecting rank of the matrices A, B and its sum S. Could you write down that here? It will be a great help for me.  Means equation  or inequality connecting rank(S), rank(A) and rank(B). How are parentheses interpreted at the command line? The Impossible puzzle ("Now I know your product") I am trying to figure out this impossible problem by Martin Gardener and still havent found a suitable solution or link to it     Two mathematicians S and P are discussing two   unknown integers, both greater than 1. S knows only the sum of the   numbers, whereas P knows only their product.:      S: "I see no way you can determine my sum."    P (after a suitable delay): "That didn't help me. I still don't know your sum." S (after   another delay): "Now I know your product." What are the two numbers?   I have seen the answers on the xkcd wiki link for this at  say 13 and 16 and it checks out mathematically but then there are more ambiguous responses and most of the attempts seem brute force rather than logic.  My question is two fold   How to solve this problem logically? Are there more answers then 13,16 or this answer is the only one even as the upper bound k(upper bound on answer) shifts higher I am trying to adjust spacing between entries in LoF and LoT. My code is  \documentclass[11pt,a4paper]{book} \usepackage[english,greek]{babel} \setcounter{secnumdepth}{3} \usepackage[iso-8859-7]{inputenc} \usepackage{kerkis} \usepackage[pdftex]{graphicx} \usepackage[margin=2.8cm]{geometry} \usepackage[Glenn]{fncychap} \usepackage{fancyhdr} %!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \usepackage{tocloft} \setlength\cftparskip{-15pt}%For ToC works great \setlength\cftbeforesecskip{-8pt}%For ToC works great \setlength\cftbeforesubsecskip{-5pt}%For ToC works great \setlength\cftbeforechapskip{-1pt}%For ToC works great \setlength\cftaftertoctitleskip{-50pt}%For ToC works great  % I also tried \renewcommand instead of \setlength \setlength\cftbeforeloftitleskip{-2cm}%It has no effect in LoF \setlength\cftbeforelottitleskip{-5cm}%It has no effect inLoT  \makeatletter \newcommand*{\tocwithouttitle}{\@starttoc{toc}} \makeatother %-------------------------------------------------------------------------------- \makeatletter \newcommand*{\lofwithouttitle}{\@starttoc{lof}} \makeatother %-------------------------------------------------------------------------------- \makeatletter \newcommand*{\lotwithouttitle}{\@starttoc{lot}} \makeatother %-------------------------------------------------------------------------------- %!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}  \begin{document}  %~~~~~~~~~~~~~~~~~~~~~~~Front-Page~~~~~~~~~~~~~~~~~~~~~~~~~~ \begin{titlepage} Εξώφυλλο \end{titlepage}  \chapter*{\contentsname} \markboth{\MakeUppercase{\contentsname}}{\MakeUppercase{\contentsname}} \tocwithouttitle \addcontentsline{toc}{chapter}{Πειρεχόμενα}  %LoF \chapter*{Κατάλογος σχημάτων}%List of Figures \markboth{\MakeUppercase{Κατάλογος Σχημάτων}}{\MakeUppercase{Κατάλογος Σχημάτων}} %\renewcommand\cftbeforeloftitleskip{5pt} %\renewcommand\cftbeforelottitleskip{5pt} \lofwithouttitle %\setlength\cftbeforefigskip{0pt} \addcontentsline{toc}{chapter}{Κατάλογος Σχημάτων}  %LoT \newpage  \chapter*{Κατάλογος Πινάκων} \markboth{\MakeUppercase{Κατάλογος Πινάκων}}{\MakeUppercase{Κατάλογος Πινάκων}} \lotwithouttitle %\renewcommand\cftbeforeloftitleskip{5pt} %\renewcommand\cftbeforelottitleskip{5pt} \addcontentsline{toc}{chapter}{Κατάλογος Πινάκων}  \newpage \end{document}   While some code is working on ToC(See comments in Preamble) I cannot adjust spacing in LoF/LoT. How can this be achieved? Biblatex enumerating sorted bibliography (using authoryear-ibid style) How can I set biblatex to insert "1. " before first bibliography item and so on? The bibliography is sorted by author and the numbers are not meant to be used anywhere else. Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a &quot;(retired)&quot; next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type. Recently my paper is reviewed (by a professor from independent third party) and accepted by a journal. But, my employer allows me to publish this paper only without its name there.  Publishing house is expecting affiliation for each author, i.e. I can not leave affiliation as blank.   What should I write as the affiliation? How to add features to a PostGIS layer using Quantum GIS? I am using Quantum GIS and the PostGIS dbms. I am able to call the PostGIS layer into QGIS but i am unable to add feature to it. I am using the method of adding features to a Shapefile but still it is not getting reflected in the layer, and I don't know how to save it to the PostGIS database if I am able to add the feature to the PostGIS layer.  I may not have used some technical term for this problem because i don't know what to call it, I am expressing the problem in my own terms. With a two-party system, our nation will divide the people (who/whom)   most need to be brought together.   Do I use who or whom for this sentence?  I think that "people" is the direct object and warrants the use of "whom", but I want to make sure I'm right. Let's say I have a generic member in a class or method, like so: public class Foo&lt;T&gt; {     public List&lt;T&gt; Bar { get; set; }          public void Baz()     {         // get type of T     }    }  When I instantiate the class, the T becomes MyTypeObject1, so the class has a generic list property: List&lt;MyTypeObject1&gt;. The same applies to a generic method in a non-generic class: public class Foo {     public void Bar&lt;T&gt;()     {         var baz = new List&lt;T&gt;();                  // get type of T     } }  I would like to know what type of objects the list of my class contains. So what type of T does the list property called Bar or the local variable baz contain? I cannot do Bar[0].GetType(), because the list might contain zero elements. How can I do it? What is mirror lockup and what is its primary function? My SLR is equipped with the mirror lockup function. What does it do, and when would I employ such a feature? Trisect a quadrilateral into a $9$-grid; the middle has $1/9$ the area Trisect sides of a quadrilateral and connect the points to have nine quadrilaterals, as can be seen in the figure. Prove that the middle quadrilateral area is one ninth of the whole area.