doufei16736 2016-06-08 19:18
浏览 74

插入新数据属性后刷新Div

I am trying to put new data attributes to my div, all is good and I can set it with jquery, but I need to reload that div in order to generate new stuff inside it. I am trying to populate new PowerBI dashboard every time user selects new dashboard. I am using powerbi.js library in order to do that, first time when page loads with strict data-attributes it works, I just thinking how to change it inside page without reloading all the page.

            $('#Report').attr('powerbi-access-token', apptoken);
                            $(".btn-success").click(function(){
                                 var getValue = $(this).attr('atributas');
                                 var listData = <?php echo json_encode($listas);?>;
                                 var fubar = ((listData[getValue]['name']));
                                 $('#Report').hide();
                                 $('#Report').attr('powerbi-report', listData[getValue]['id']); 
                                 $('#Report').attr('powerbi-embed', listData[getValue]['embedUrl']);   
                                 $("#Report").hide().fadeIn('fast');
                                 $('#Report').show();
                                $('#Report').reload();
                            });
                        });
                </script>

        <div class="side-body padding-top">
            <script>window.powerbi = window.powerbi || {};</script>
                 <div id="Report" powerbi-access-token="" 
                 powerbi-embed="https://embedded.powerbi.com/appTokenReportEmbed?reportId=2a647e7f-6103-4ace-a2fa-dasdasd" 
                 powerbi-report="589bacd1-aa9c-47aa-987b-asdasd" style="height:859px"> 
                </div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 Revit2020下载问题
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大