Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
- </head>
- <body>
- <script type="text/javascript">
- var disqus_shortname = 'elopakao';
- var disqus_identifier; //made of post id and guid
- function loadDisqus(source, identifier) {
- if (window.DISQUS) {
- $('#disqus_thread').insertAfter(source); //append the HTML after the link
- //if Disqus exists, call it's reset method with new parameters
- DISQUS.reset({
- reload: true,
- config: function () {
- this.page.identifier = identifier;
- }
- });
- } else {
- //insert a wrapper in HTML after the relevant "show comments" link
- jQuery('<div id="disqus_thread"></div>').insertAfter(source);
- disqus_identifier = identifier; //set the identifier argument
- //append the Disqus embed script to HTML
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
- $('head').append(dsq);
- }
- };
- </script>
- <div class="this-is-single-post-wrapper">
- <!-- this part will likely contain individual post data -->
- <a onclick="loadDisqus($(this), 'luka');">
- Show comments
- </a>
- </div>
- <div class="this-is-single-post-wrapper">
- <!-- this part will likely contain individual post data -->
- <a onclick="loadDisqus($(this), 'jakoduginizznakova2');">
- Show comments
- </a>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement