Created
July 23, 2015 11:30
-
-
Save kdes70/7d49dcfaf42a795fa68f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('google_preview').innerHTML = '<span class="google_preview_title">' + document.getElementById('theme_metatitle').value + '</span><br/><span class="google_preview_seo_url">'+ domain_name_short + script_url + seo_url + '</span><br/><span class="google_preview_page_description">'+ document.getElementById('theme_metadescription').value+'</span>'; | |
var img_id = 'google_preview_img'; | |
if(typeof jQuery('#'+img_id).data('qtip') == 'object') | |
{ | |
var api = jQuery('#'+img_id).qtip("api"); | |
change_google_preview(); | |
} | |
else | |
{ | |
jQuery('#'+img_id).qtip({ | |
content: '', | |
show: 'mouseover', | |
hide: 'mouseout', | |
position: { | |
corner: { | |
target: 'topMiddle', | |
tooltip: 'bottomMiddle' | |
} | |
}, | |
style: { | |
background: '#ffffff', | |
border: { | |
width: 5, | |
color: '#dfdfdf' | |
}, | |
tip: { | |
corner: 'bottomMiddle', | |
size:{ | |
x: 18, | |
y: 13 | |
} | |
}, | |
classes: { | |
content: "google_preview_content", | |
tooltip: "google_preview_tooltip" | |
} | |
}, | |
api:{ | |
beforeShow: function(){ | |
var img_id_temp = 'google_preview_img'; | |
var div_id_temp = 'google_preview'; | |
var api = jQuery('#'+img_id_temp).qtip("api"); | |
api.updateContent(document.getElementById(div_id_temp).innerHTML,false); | |
} | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment