using multiple return statements in JavaScript

前端 未结 4 1726
忘掉有多难
忘掉有多难 2021-01-16 12:26

I am trying to use multiple returns but just keep breaking the code. I have tried a few examples, but cant find the right combination.

How can I combine these two r

4条回答
  •  孤城傲影
    2021-01-16 12:46

    You can return objext ir array containig those two items

    $(".bar").popover({
    content: 
        function (){
            return 
            {
            status: $(this).data('dataObj').status;
            timeline: $(this).data('dataObj').timeline;
            }
        }
    });
    

提交回复
热议问题