Can you load a random file each time you click the same button with jQuery? -


i have 4 contact forms rotate testing. don't want run these in separate campaigns , such simple thing overkill. possible have group of 4 forms , load them randomly ( different form ) each time click button?

$(function() {     $("a.random")click.(function){     //?     }); }); 

yes.

<form id="form0" class="test_form"> <form id="form1" class="test_form" style="display: none;"> <form id="form2" class="test_form" style="display: none;"> <form id="form3" class="test_form" style="display: none;"> 

$(function() {     $("a.random")click.(function){        $(".test_form").hide();        var formnumber = math.floor(math.random() * 4);//will equal number between 0 , 3        $("#form" + formnumber).show();     }); }); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -