Hi there
I’m trying to modify a jquery script. The standard is defined, that certain values are coming from a html form. I actually don’t like the form on the page and would like to set in the jquery file the default values. So all values are already set in the jquery also the values if a checkbox is checked or not.
How can I define in there some default values? I am a newbie with jquery… I thought I just can add the values like this (which was not the correct solution):
var numberOfBokehs = $("#nrOfOrbs").val('100');
-> (‘100’)
function repaint() {
// Retrieve all user submitted data
var numberOfBokehs = $(“#nrOfOrbs”).val();
var bokehMinSize = parseInt($(“#orbMin”).val());
var bokehMaxSize = parseInt($(“#orbMax”).val());
var orbColour = $(“#orbColour”).val();
// Check if we need to create random colours
var useRandomColours = false;
if ( $(“#orbRandom”).is(“:checked”) ) {
useRandomColours = true;
}
// Check if we need to create gradients
var useGradients = false;
if ( $(“#orbGradient”).is(“:checked”) ) {
useGradients = true;
}
Thank you for your help… Peter