• 25-12-2016, 16:46:04
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Arkaaşlar bir wordpress eklentisi kullanıyorum bir bölümde popup ile menü açılıyor ve o popupu aşağı kaydıramadığım için alttaki bilgileri göremiyorum. Popup a nasıl kaydırma butonu koyabilirim?

    Aşağı maus topu ile iniyorum ancak popup sabit kalıyor, sayfa aşağı iniyor.

    Bunu nasıl çözebilirim

    popup.js diye bir dosya var ve içerisinde şöyle bir popup kodu var

    	//POP-UP 
      $("body").on("click", ".show-popup", function(event){	
    		
    			
    			var student_id = $(this).attr('idtest') ;
    			
    			
    		event.preventDefault(); // disable normal link function so that it doesn't refresh the page
    		var docHeight = $(document).height(); //grab the height of the page
    		var scrollTop = $(window).scrollTop(); //grab the px value from the top of the page to where you're scrolling
    		//var id = $(this).data('idtest') ;
    		//$('.popup-bg').show().css({'height' : docHeight}); //display your popup and set height to the page height
    		//$('.overlay-content'+id).css({'top': scrollTop+20+'px'}); //set the content 20px from the window top
    		
    		var curr_data = {
    					action: 'smgt_result',
    					student_id: student_id,			
    					dataType: 'json'
    					};
    					//alert('hello');
    					$.post(smgt.ajax, curr_data, function(response) {
    						
    						//alert('hello');
    						//alert(response);
    						$('.popup-bg').show().css({'height' : docHeight});
    						$('.result').html(response);
    Aşağıdaki koda tıklayınca da popup açılıyor;

    <a href="?dashboard=user&page=student&action=result&student_id=<?php echo $retrieved_data->ID;?>" class="show-popup btn btn-default" 
                                        idtest="<?php echo $retrieved_data->ID; ?>"><i class="fa fa-bar-chart"></i> <?php _e('Notlarını Görüntüle', 'school-mgt');?></a>
    Sayfayı yeni sekmedede açabiliriz. Bunun için de önerilrinizi bekliyorum
  • 25-12-2016, 21:08:37
    #2
    Hocam kaydırma yerine css kısmında düzenleme yapabilirsenizde istediğiniz gibi olur.
    Büyük ihtimal popup penceresinin en dıştaki tag ın position değeri fixed verilmiştir, onu bulup absolute yaparsanız sayfayı aşağı doğru kaydırdığınız zaman popup pencere sabit kalmaz oda yukarı doğru kayar, yada popup pencereniz overflow- y değerini scroll olarak belirtebilirsiniz.