[BBCode] Go to mark points
Page 1 of 1
[BBCode] Go to mark points
this BBcode help everyone can view topic easier via markPoint if the post is too long to scroll exactly.
BBCode:
1. Create mark point
BBCode: [markP=<number>] anchor [/markP]
actionscript: ACP>Modules>HTML&JavaScript> JavaScript codes Management
1. Go to mark point
BBCode: [GoTo=<number>] anchor [/GoTo]
javascript: ACP>Modules>HTML&JavaScript> JavaScript codes Management
BBCode:
1. Create mark point
BBCode: [markP=<number>] anchor [/markP]
actionscript: ACP>Modules>HTML&JavaScript> JavaScript codes Management
- Code:
/***
* Date: 26/06/2016
* Author: jackauk
***/
jQuery(document).ready(function($) {
var jContent = $('.postbody, .blog_message');
jContent.html(function() {
return $(this)
.html()
.replace(/\[markP=(.*?)\](.*?)\[\/markP\]/g,'<p id="$1">$2</p>');
});
});
1. Go to mark point
BBCode: [GoTo=<number>] anchor [/GoTo]
javascript: ACP>Modules>HTML&JavaScript> JavaScript codes Management
- Code:
/***
* Date: 26/06/2016
* Author: jackauk
***/
jQuery(document).ready(function($) {
var jContent = $('.postbody, .blog_message');
jContent.html(function() {
return $(this)
.html()
.replace(/\[GoTo=(.*?)\](.*?)\[\/GoTo\]/g,'<p id="g$1">$2</p>');
});
$('p').click(function() {
var address_origin = $(this).attr("id");
if (address_origin.indexOf("g")==0)
{
var address = '#'+ $(this).attr("id").replace('g','');
$(document.body).animate({ 'scrollTop': $(address).offset().top}, 1000);
}
});
});
function gotoMark(GAL) {
var address_origin = $(this).attr("id");
if (address_origin.indexOf("g")==0)
{
var address = '#'+ $(this).attr("id").replace('g','');
$(document.body).animate({ 'scrollTop': $(address).offset().top}, 1000);
}
}
Similar topics
» How can add the BBCode Button on the title bar of BBCode Table?
» bought points,but my points in points management is still 0.
» Accidentally changed Points to Infraction Points in Admin Control Panel and don't know how to change it back
» Donating Points Activity Points Donate Button
» Points: Transfer/Send points to another user?
» bought points,but my points in points management is still 0.
» Accidentally changed Points to Infraction Points in Admin Control Panel and don't know how to change it back
» Donating Points Activity Points Donate Button
» Points: Transfer/Send points to another user?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum