1
2
3
4
5
6
7
8
9
10
11
12
|
$(document).ready(function () {
$('#floating-bar').fshare({
theme: 'default',
facebook: true,
twitter: false,
stumbleupon: false,
linkedin: false,
googleplus: true,
upperLimitElementId: 'content',
lowerLimitElementId: 'colophon'
});
});
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//Making jQuery Google API
function modify_jquery() {
if (!is_admin()) {
// comment out the next two lines to load the local copy of jQuery
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.1');
wp_enqueue_script('jquery');
}
}
add_action('init', 'modify_jquery');
// Float Social Share scripts
function float_social_share() {
wp_enqueue_script('float-social', get_template_directory_uri(). '/fshare.js', array('jquery'), true);
wp_enqueue_style('float-social-style', get_template_directory_uri(). '/fshare.css', array(), null);
wp_enqueue_script('float-social-script', get_template_directory_uri(). '/fshare-script.js', array('jquery'), true);
}
add_action( 'wp_enqueue_scripts', 'float_social_share' );
|
1
|
<div id="floating-bar"></div>
|
1
2
3
4
5
|
.fshare-default {
background: #F1F1F1;
margin-top: 10px;
border: 1px solid #e8e8e8;
}
|
1
|
theme: 'default',
|
1
|
speed: 200,
|
Comments[ 0 ]
Đăng nhận xét