Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var bSuppressScroll = false;
- $(document).ready(function()
- {
- function last_msg_funtion()
- {
- var ID=$(".message_box:last").attr("id");
- $('div#last_msg_loader').html('<img src="./images/bigLoader.gif">');
- $.post("index.php?action=get&last_msg_id="+ID,
- function(data) {
- if (data != "") {
- $(".message_box:last").after(data);
- window.bSuppressScroll = false;
- }
- $('div#last_msg_loader').empty();
- $('div#last_msg_loader').hide();
- });
- };
- $(window).scroll(function(){
- if ( ( $(window).scrollTop() == $(document).height() - $(window).height() ) && window.bSuppressScroll == false ){
- last_msg_funtion();
- window.bSuppressScroll = true;
- }
- });
- // Load Modal
- $(document).on('mouseenter', "#grid li a", function() {
- $("#grid li a").each(function (){
- //var id = $(this).data('rel');
- $(this).click(function(){
- return false;
- });
- $(this).qtip({
- content: {
- prerender: true,
- text: 'Loading...',
- ajax: {
- //url: 'watch.php?pID=' + $(this).attr("href"),
- url: $(this).attr("href"),
- //url: './watch.php',
- type: 'GET', // POST or GET
- //data: '?pID=' + id,
- success: function(data, status) {
- this.set('content.text', data);
- // Init tabs
- $("#thumbs ul", this.elements.content).idTabs();
- }
- }
- },
- position: {
- my: 'center',
- at: 'center',
- target: $(window),
- corner: 'topMiddle',
- adjust: {
- scroll: false
- //method: 'shift none'
- }
- },
- style: {
- width: '620px',
- height: '500px',
- classes: 'qtip-rounded qtip-shadow'
- }, //style
- show: {
- //ready: true,
- event: 'click',
- delay:0,
- solo:true,
- modal:{on:true}
- },
- hide: {
- event: 'click'
- },
- onHide: function() { $(this).qtip('destroy'); }
- });
- //}
- // End qtip check
- });
- });
- function getParameterByName(name) {
- var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
- return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
- }
- });
Add Comment
Please, Sign In to add comment