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
Post a Comment