Loading random form into jQuery Tools overlay -
i asked how load random form in thread , got great answers. here got , verified work
$(function() { $("a.random")click.(function){ $(".test_form").hide(); var formnumber = math.floor(math.random() * 4);//will equal number between 0 , 3 $("#form" + formnumber).show(); }); }); i need apply somehow jquery tools overlay being triggered such
<a href="forms/supportformtest.php" rel="#overlayform"> and modify href somehow include reference function. removing href , using class work? somehow have add path forms in directory "/forms". appreciated, flowplayer.org forms less helpful
you can use .data() attach arbitrary data element.
if it's string data you're looking store, can instead use .attr() save string attribute on element. html-5-compliant goodness, use attribute starts data-.
edit requested, lazy copypasta:
i don't know php, , don't know how site set up, basic idea be:
- link
forms/randomform.php randomform.phpsend http redirect browser, telling request actual form page, chosen @ random - say,forms/form2.php.- the browser has actual form put overlay.
does sound reasonable? if still want have randomization in browser, explain you're trying randomize?
Comments
Post a Comment