Stop loading default css after ajax call

做~自己de王妃 提交于 2020-03-25 22:01:50

问题


I am new with ajax call, currently i am developing a custom style for my dashboard using a hosted web. so im just applying custom style ontop of it .

i tried applying custom style on background, after ajax is loaded. it still working. once i applied it on my table td, it will revert back .

  f.afterDraw = function () {
     const evt = d3.selectAll("#" + arcapi.chartId() + " span.crosstab-expand")
     const chChange = d3.selectAll("#" + arcapi.chartId() + " td.viz-td-header").append('div').attr('class','roger').text("test")
//     chChange.style('background','red')

    let bg = d3.select("#" + arcapi.chartId() + ' td')



  $(document).ajaxStart(function(){
    console.log('starting')
  });

  $(document).ajaxComplete(function(){
     bg.style('background','grey')
    console.log('completed')
  });





  };

What i am encountering is its reverting back to its original default style after ajax is loaded. how can we stop it going back its default stylesheet?

来源:https://stackoverflow.com/questions/60182797/stop-loading-default-css-after-ajax-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!