Options

Below are a full list of available options.

text.header
type: string/html default: null
Optional. Defines the header of the locker.
Example:
$(".to-lock").sociallocker(function(){
    text: {
        header: "This content is locked!"
    }
});
text.message
type: string/html default: null
Optional. Defines the message below the header.
Example:
$(".to-lock").sociallocker(function(){
    text: {
        message: "Please support us, share this page to unlock this content."
    }
});
content
type: string/html default: null
Optional. Defines the content which has to be visible after unlock. By default, the CSS selector is used to pick the content to lock.
Example:

$(".to-lock").sociallocker(function(){
    content: "My locked content"
});
theme
type: string default: 'default'
Optional. Defines a theme of your locker. Possible values: default, secrets, flat, dandyish, glass.
Example:
$(".to-lock").sociallocker(function(){
    theme: "flat"
});
cssClass
type: string default: null
Optional. Additional CSS class added to the locker element.
Example:
$(".to-lock").sociallocker(function(){
    cssClass: "my-class"
});
lang
type: string default: 'en_US'
Optional. Defines a language of social buttons. See the full list of supported languages here: https://www.facebook.com/translations/FacebookLocales.xml
Example:
$(".to-lock").sociallocker(function(){
    lang: "de_DE"
});
buttons.order
type: array default: ["facebook-like", "twitter-tweet", "google-plus"]
Optional. Defines an order of social buttons available to unlock content. Possible values: twitter-tweet, twitter-follow, facebook-like, facebook-share, google-plus, google-share, linkedin-share, youtube-subscribe.
Example:
$(".to-lock").sociallocker(function(){
    buttons: {
        order: ["facebook-like", "twitter-tweet", "google-plus"]
    }
});
buttons.counters
type: bool default: true
Optional. If true, displays counters for social buttons (Tweet button doesn't have a counter).
Example:
$(".to-lock").sociallocker(function(){
    buttons: {
        counters: true
    }
});
buttons.lazy
type: bool default: false
Optional. If true, social buttons are loaded only at the moment when the locker gets visible on the screen (for better performance).
Example:
$(".to-lock").sociallocker(function(){
    buttons: {
        lazy: true
    }
});
overlap.mode
type: string default: 'full'
Optional. Choose the way how your locker must lock your content. The blurring mode works in all browsers except IE 10-11 (In IE 10-11, the transparency mode will be applied). Possible values: full, transparence, blurring.
Example:
$(".to-lock").sociallocker(function(){
    overlap: {
        mode: 'blurring'
    }
});
overlap.position
type: string default: 'top'
Optional. Defines the position of the locker if the mode 'transparence' or 'blurring' set. Possible values: middle, top, scroll.
Example:
$(".to-lock").sociallocker(function(){
    overlap: {
        position: 'middle'
    }
});
overlap.intensity
type: integer default: 5
Optional. Defines the overlap intensity for the blurring mode (from 0 to 10).
Example:
$(".to-lock").sociallocker(function(){
    overlap: {
        intensity: 8
    }
});
demo
type: bool default: false
Optional. If true, the locker will appear always even if it was already unlocked.
Example:
$(".to-lock").sociallocker(function(){
    demo: true
});
highlight
type: bool default: true
Optional. If true, runs the highlight effect when the content is unlocked. By default, true.
Example:
$(".to-lock").sociallocker(function(){
    highlight: true
});
googleAnalytics
type: bool default: false
Optional. If true, the plugin will generate events for the Google Analytics when the content is unlocked. Note: before enabling this feature, please make sure that your website contains the Google Analytics tracker code.
Example:
$(".to-lock").sociallocker(function(){
    googleAnalytics: true
});
locker.close
type: bool default: false
Optional. If true, shows the Close Icon in the corner.
Example:
$(".to-lock").sociallocker(function(){
    locker: {
        close: true
    }
});
locker.timer
type: bool/integer default: false
Optional. Sets a countdown interval for the locker in seconds.
Example:
$(".to-lock").sociallocker(function(){
    locker: {
        timer: 60
    }
});
locker.mobile
type: bool default: true
Optional. If true, shows the locker on mobile decices. By default, true.
Example:
$(".to-lock").sociallocker(function(){
    locker: {
        mobile: false
    }
});
locker.useCookies
type: bool default: false
Optional. Forces to use cookies instead of the Local Storage.
Example:
$(".to-lock").sociallocker(function(){
    locker: {
        useCookies: true
    }
});
locker.scope
type: bool/string default: false
Optional. Allows to bind lockers into one group. If one of lockers in the given scope are unlocked, all others will be unlocked too.
Example:
$(".to-lock").sociallocker(function(){
    locker: {
        scope: "mygroup"
    }
});
OnePress (c) 2016. Learn more about Social Locker for jQuery.