javascript - Jquery Code Sinppets to Solve -
can tell me possible solutions these??
question 1: web page form id "my_form" , few elements class "excluded" applied. how can make copy of form , rid of elements excluded class, new copy of form?
question 2: examine code snippet. think it's supposed do? why doesn't work? how fix it?
$("li").each(function () { if ($(this).find("ul")) { $(this).css("background-color", "gray"); } else { $(this).css("background-color", "white"); } });
question 3: user complaining audio playing after hitting play/pause button. given below implementation, why happen? how fix it?
// pause button implementation: $("#toggleplaypause").on("click", function () { if (audio.paused === true) { audio.play(); } else { audio.pause(); } }); // when current audio has played way through, read next element. audio.addeventlistener("ended", function () { if (audio.paused === false) { var nextelement = _getnextelement(); // scroll page next element we're reading @ top of browser window. $(window).animate(scrolltop: nextelement.offset().top, 400, function () { _playelementaudio(nextelement); }); } });
any appreciated..
question 1
$("#form").not(".excluded").clone().appendto("#anotherform");
Comments
Post a Comment