The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Javascript code

2 posters

Go down

Javascript code Empty Javascript code

Post by Mariami May 8th 2015, 12:39 pm

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');
Mariami
Mariami
Forumember

Posts : 106
Reputation : 1
Language : english

http://mundonoveleras.forum2x2.ru/forum

Back to top Go down

Javascript code Empty Re: Javascript code

Post by Mariami May 8th 2015, 12:49 pm

are you able to put me these codes with css code?
Mariami
Mariami
Forumember

Posts : 106
Reputation : 1
Language : english

http://mundonoveleras.forum2x2.ru/forum

Back to top Go down

Javascript code Empty Re: Javascript code

Post by Mariami May 10th 2015, 10:23 am

I want css code, I dont want users to be able to edit their post.
Mariami
Mariami
Forumember

Posts : 106
Reputation : 1
Language : english

http://mundonoveleras.forum2x2.ru/forum

Back to top Go down

Javascript code Empty Re: Javascript code

Post by Michael_vx May 10th 2015, 11:17 am

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%
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Javascript code Empty Re: Javascript code

Post by Mariami May 10th 2015, 10:36 pm

Michael_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%
thank you very very much. its work
Mariami
Mariami
Forumember

Posts : 106
Reputation : 1
Language : english

http://mundonoveleras.forum2x2.ru/forum

Back to top Go down

Javascript code Empty Re: Javascript code

Post by Michael_vx May 12th 2015, 10:22 am

no its thanks to
Ange
im glad your problem was solved to
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum