how to add and remove jquery tabs dynamically?

后端 未结 4 1853
广开言路
广开言路 2021-02-07 12:36

I have an aspx page on which I have 2 static jquery tabs.Upon clicking on a button avaiable on one of these tabs,I would like to add a new tab dynamically,which gets its content

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-07 13:02

    You may need to get two other jQuery UI Widgets: Dialog and Position.

    I had the same issue: downloaded the demo, and manipulate.html did not work. In my case, it was throwing an error on page load:

    $("#dialog").dialog is not a function
       close: function() { 
    

    And the page had 404s: jquery.ui.position.js jquery.ui.dialog.js

    So, the page had dependencies that were unexpected, and not included in my custom download. I went back and got another custom download from http://jqueryui.com/download

    Once the demo could resolve jquery.ui.dialog.js it worked, because the dialog function existed:

    typeof $("#dialog").dialog
    "function"
    

提交回复
热议问题