Lets say I have
<html>
<head>
<script>
function myFunction()
{
// blah blah
}
</script>
</head>
<body>
<select name="mySelect">
<option value="1"> He </option>
<option value="2"> Hi </option>
<option value="3"> Ho </option>
</select>
</body>
</html>
Lets say I have js function that generates this 'select' script. How can I add to it default script that will be ran as soon as DOM is loaded with jQuery?
something like that:
<select name="mySelect" script="myFunction()">
<option value="1"> He </option>
<option value="2"> Hi </option>
<option value="3"> Ho </option>
</select>