Javascript code
2 posters
Page 1 of 1
Javascript code
Javascript code does not work. I have activated it, but does not wor. it was working, but yesterday he did not work.
I have this codes there and none oh them is working $(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
I have this codes there and none oh them is working $(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
Re: Javascript code
use this
you was breaking the whole Script no wonder its not working
this will work 100%
- Code:
$(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
$('.sceditor-font-option.new-font').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[font='+$(this).attr('data-font')+']','[/font]');$('.sceditor-font-picker').remove();e.preventDefault()})
});
function addFont(font){$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="'+font+'"><font unselectable="on" face="'+font+'">'+font+'</font></a>')}
})});
you was breaking the whole Script no wonder its not working
this will work 100%
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Javascript code
thank you very very much. its workMichael_vx wrote:use this
- Code:
$(function(){$(function() {
$('.sceditor-button-size').click(function() {
addSize(8, 'before');
addSize(6, 'before');
addSize(26, 'after');
addSize(28, 'after');
$('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
});
function addSize(size, position){
var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
}
})});
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Papyrus');
addFont('Brush script MT');
addFont('Dom Casual');
addFont('KR Love Letters');
addFont('CookieMonster');
addFont('Dove Love');
addFont('Forte');
addFont('HeartlandRegular');
addFont('JLR Simple Hearts');
addFont('Jokerman');
addFont('KR Love Letters');
addFont('KR Valentine Heart');
addFont('KR Yours Truly');
addFont('Margarita in August');
addFont('Mark');
addFont('MC Sweetie Hearts');
addFont('Newlywed');
addFont('Caprica Sans IT Personal Use ');
addFont('Kiss Me Quick');
addFont('Starlight');
$('.sceditor-font-option.new-font').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[font='+$(this).attr('data-font')+']','[/font]');$('.sceditor-font-picker').remove();e.preventDefault()})
});
function addFont(font){$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="'+font+'"><font unselectable="on" face="'+font+'">'+font+'</font></a>')}
})});
you was breaking the whole Script no wonder its not working
this will work 100%
Re: Javascript code
no its thanks to
Ange
im glad your problem was solved to
Ange
im glad your problem was solved to
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Similar topics
» Javascript code help?
» Javascript code
» Javascript code
» How to add a class to this javascript code?
» JavaScript code issue
» Javascript code
» Javascript code
» How to add a class to this javascript code?
» JavaScript code issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum