Here is the code.
<script type="text/JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" ></script>
//This line here is required or the ReferenceError: MktoForms2 is not defined
<script type="text/JavaScript" src="http://info.purestorage.com/js/forms2/js/forms2.min.js" ></script>
<script type="application/javascript">
var $ = jQuery.noConflict();
var Locations = ["<b>San Francisco</b><br /> What a foggy city!","<b>New York</b><br /> It's the Big Apple, need we say more!", "<b>London</b><br /> It's a foggy city too, ever heard of London Fog?"];
function changeLoc(i) {
i = i - 1;
$("#Location-Tag").html(Locations[i]);
}
//requires a second inline load of forms2.min.js to be available. See http://developers.marketo.com/documentation/websites/forms-2-0/
MktoForms2.whenReady(function (form){
//Attach change of select to display
$(document).ready(function() {
//This is the failing element in that Jquery calls ready before form is loaded.
$("#repurpose8").change( function(){
changeLoc($(this).children('option:selected').index());
});
});
});
</script>
Brennan McAdams