Hướng dẫn :
Bước 1 Cho code sau vào javascript
Tittle : Quick Quote
Place : In the topic
Java code :
Bước 2 : Cho code sau vào CSS
Bước 1 Cho code sau vào javascript
Tittle : Quick Quote
Place : In the topic
Java code :
- Code:
$(function() {
var CopyrightNotice = 'Quick Quote in Quick Reply for forumotion boards. All Rights Reserved. Use and modification of this script is not allowed without this entire copyright notice in the original, copied, or modified script. No distribution without consent.';
$('.i_icon_quote', document.getElementById('main-content')).click(function(e) {
e.preventDefault();
var selection = (function() {
if (window.getSelection) {
var e = document.activeElement;
return (e && e.tagName.toLowerCase() in {textarea:1, input:1}) ? e.value.substring (e.selectionStart, e.selectionEnd) : window.getSelection().toString();
}
else if(document.selection.createRange) {
return (document.selection.createRange()).text || '';
}
return null;
})();
if(selection) return bbfontstyle('[quote]' + selection + '[/quote]', '');
var x = $('body').append('<div id="LGquote_loading" style="display:none"><img src="http://i40.servimg.com/u/f40/17/20/25/96/26-110.gif"></div><div id="LGquote" style="display:none"></div>').find('#LGquote');
var loading = document.getElementById('LGquote_loading'), textbox = document.post.message;
textbox.focus();
for(var i in {Width:1,Height:1,Left:1,Top:1}) loading.style[i.toLowerCase()] = textbox['offset' + i] + 'px';
loading.style.display = '';
x.load(this.parentNode.href + ' textarea', function() {
bbfontstyle(x[0].getElementsByTagName('textarea')[0].value, '');
x.add(loading).remove();
});
});
});
Bước 2 : Cho code sau vào CSS
- Code:
#LGquote_loading {
background-color: #AAA;
text-align: center;
opacity: 0.6;
-moz-opacity: 0.6;
-webkit-opacity: 0.6;
filter: alpha(opacity=60);
position: absolute;
}
#LGquote_loading img {
margin-top: 30px;
}