Menu
Hi,
I need to make this static jquery code totally dynamic.
Question is, how to start the abc function on the newimage object?
The Problem is this line:
[B] $(newimg).abc({
OLD static, working:
[CODE]
<img src=”001.jpg” class=”dosomething” />
$(document).ready(function(){
$(“img.dosomething”).abc({
option1: A,
option2: B
});
});
NEW dynamic:
(values hard-coded for testing only)
[CODE]
$(document).ready(function(){
var newimg= document.createElement(‘img’);
newimg.src = “001.jpg”;
newimg.setAttribute(‘class’, ‘dosomething’);
$(newimg).abc({
option1: A,
option2: B
});
});