N
N
Nikita2016-02-23 10:47:28
JavaScript
Nikita, 2016-02-23 10:47:28

How to put javascript in bootstrap tabs?

I'm trying to display posts from vk.com on my site and sort them into tabs.
Each post has this code:

<div id="vk_post_1_45616"></div>
<script type="text/javascript">
  (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return; js = d.createElement(s); js.id = id;
 js.src = "//vk.com/js/api/openapi.js?121"; fjs.parentNode.insertBefore(js, fjs); }
(document, 'script', 'vk_openapi_js'));
  (function() {
    if (!window.VK || !VK.Widgets || !VK.Widgets.Post || !VK.Widgets.Post("vk_post_1_45616", 1, 45616, 'Zs4_Z91jpwhAesZbUMD92Pw4ew0', {width: 665})) setTimeout(arguments.callee, 50);
  }());
</script>

But no matter which tab I click on, all posts are displayed (display none does not work) How to solve this problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question