jquery - How can I keep this appended DIV in place after "price" changes? -



jquery - How can I keep this appended DIV in place after "price" changes? -

i designing site on custom built cms, developed old job:

http://dev544.webdugout.com/view/snow-removal

in order me move cost div "productprice" bottom of page, used following:

$(".productprice").appendto(".productpricecontainer");

i used next add together text in front end of numeric price:

$( ".productprice" ).prepend( '<h2><span>4</span> total cost be</h2>');

everything looks great, though 1 time take option, changes price, div goes it's original position in code , removes text added. way can resolve jquery , without having approach programmer this?

thanks!

the reason elements moving top because original position in dom when page first loaded. when select item dropdown page performing postback , javascript not called again. seek using code below. should cause javascript called each time perform postback.

function pageload() { bindjqueryevents(); $(".productprice").prepend('<h2><span>4</span> total cost be</h2>'); } //re-bind callbacks var prm = sys.webforms.pagerequestmanager.getinstance(); prm.add_endrequest(function () { bindjqueryevents(); }); function bindjqueryevents() { $(".productprice").appendto(".productpricecontainer"); }

jquery css prepend appendto

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -