vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   jquery social share script (https://vborg.vbsupport.ru/showthread.php?t=297034)

Chadi 04-09-2013 06:51 PM

jquery social share script
 
Hey guys,

Trying to add this to my site in footer.

http://plugins.in1.com/share/demo

I'm not sure what I'm doing wrong here.

I've added this in the headinclude template

Code:

<script type="text/javascript">
        $('#mydiv').share({
        networks: ['facebook','googleplus','twitter','tumblr','email','stumbleupon','digg']
    });
</script>

<script type="text/javascript" src="clientscript/jquery.share.js"></script>
<link rel="stylesheet" type="text/css" href="clientscript/jquery.share.css" />

The paths are correct.

I added this in footer template

Code:

<div id="mydiv"></div>
Doesn't show up at all. Any ideas?

Chadi 04-10-2013 08:21 PM

Anyone please? :)

--------------- Added [DATE]1365714587[/DATE] at [TIME]1365714587[/TIME] ---------------

I found an issue.

Code:

<div id="mydiv"></div>

<script type="text/javascript" src="clientscript/jquery.share.js"></script>
<link rel="stylesheet" type="text/css" href="clientscript/jquery.share.css" />

<script type="text/javascript">
  $('#mydiv').share({
    networks: ['facebook','googleplus','twitter','tumblr','email','stumbleupon','digg']
  });
</script>


The script only appears when not logged in. Once logged in, it disappears.

I've replicate this when I placed it in header, footer and showthread templates (one at a time too).

Someone mentioned this to me from another forum

Quote:

The problem is that when you are logged in, jQuery is suddenly not defined, that is to say, you no longer reference the jQuery code in your page.
When you are not logged in, it is included in the hgead section of your document on line 94:

Code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
However, when you log in, this line vanishes from the source code.
Anyone have any idea how to fix that?


All times are GMT. The time now is 02:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00941 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete