jquery - How to set cookie and refresh page after radio button is clicked? -


I am trying to pass a radio button value in the cookie and refresh my page on click my code: < / P>

  Inheritance line: & lt; Label & gt; & Lt; Input name = 'inheracline' type = 'radio' value = "father" checked & gt; & Lt; / Input & gt; Father & lt; / Label & gt; & Lt; Label & gt; & Lt; Input name = 'inheritacline' type = 'radio' value = "mother" & gt; & Lt; / Input & gt; Mother & lt; / Label & gt; $ ("Input: Radio [name = BarSenne]"). Change (function () {if ($ (this) .attr ("checked") == "checked") {$ .cookie ('inheritaceline', $ (this) .val ());} window.location .reload ();});   

But that does not work because the page does not refresh after the click. How should I change my code to work properly?

I think that's probably an old JQuery version. Try using version 1.8 plus buddy and then check it out. Try the Bela, use the ur code. :)

Jsfiddle



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -