Uzman Cevap beta aşamasından çıkmaya hazırlanıyor! Yenilikleri takipte kalın.

reveal modal veri gönderdiğinde kapanmıyor

Merhaba arkadaşlar böyle bir şey yazdım. ama form çalışıyor sql veri kayıt ettiriyorum. ama pencereyi kapatamıyorum. Elimde böyle javascript kodla saniye kapatta biliyordum. Şimdi kapatamıyorum bir sıkıntı var çözemedim

Bu kapatma foksiyonu: pncr-kapat




<div id="myModal" class="edit-pncr-ayar">
	<form id="yrm-frm" class="form-ayar">
		<div class="edit-pncr-bslk">Yorum Yaz</div>
		<div class="edit-pncr-cizgi"></div>
        <div class="blg-prf-uclu-ayar">
			<div class="edit-pncr-uclu">
				<div class="edit-pncr-baslik">İsim</div>
				<div class="edit-pncr-nokta">:</div>
				<div class="edit-pncr-text">
					<input type="text" name="isim" class="edit-text" maxlength="25">
                </div>
			</div>
			<div class="edit-pncr-uclu">
				<div class="edit-pncr-baslik">Soyisim</div>
				<div class="edit-pncr-nokta">:</div>
				<div class="edit-pncr-text">
					<input type="text" name="soyisim" class="edit-text" maxlength="25">
                </div>
			</div>
			<div class="edit-pncr-uclu">
				<div class="edit-pncr-baslik">E-Posta</div>
				<div class="edit-pncr-nokta">:</div>
				<div class="edit-pncr-text">
					<input type="text" name="eposta" class="edit-text" maxlength="25">
                </div>
			</div>
			<div class="edit-pncr-uclu">
				<div class="edit-pncr-baslik">Mesajınız</div>
				<div class="edit-pncr-nokta">:</div>
				<div class="edit-pncr-text">
                	<textarea name="mesaj" class="edit-textarea"></textarea>
                </div>
			</div>
            <div class="edit-pncr-uclu">
				<div class="edit-snc" id="edit-snc"></div>
                <div class="edit-bttn">
                	<input type="hidden" name="yid" value="<?=$query["yid"];?>">
                	<a class="bttn-kapat  pncr-kapat" title="Kapat">Kapat</a>
                    <input type="button" onclick="YorumYaz()" class="bttn-mavi" value="Kaydet">
                </div>
            </div>
		</div>
	</form>
</div>
 


 
(function($) {
	$('a[data-reveal-id]').live('click', function(e) {
		e.preventDefault();
		var modalLocation = $(this).attr('data-reveal-id');
		$('#'+modalLocation).reveal($(this).data());
	});
// Kapatma Foksiyonu

    $.fn.reveal = function(options) {
		var defaults = {  
	    	animation: 'fadeAndPop',
		    animationspeed: 300,
		    closeonbackgroundclick: true,
		    dismissmodalclass: 'pncr-kapat',
    	};
		
        //Extend dem' options
        var options = $.extend({}, defaults, options); 
	
        return this.each(function() {
/*---------------------------
 Global Variables
----------------------------*/
        	var modal = $(this),
        		topMeasure  = parseInt(modal.css('top')),
				topOffset = modal.height() + topMeasure,
          		locked = false,
				modalBG = $('.reveal-modal-bg');
			
			if(modalBG.length == 0) {
				modalBG = $('<div class="reveal-modal-bg" />').insertAfter(modal);
			}		    
     		
			
/*---------------------------
 Open & Close Animations
----------------------------*/
			//Entrance Animations
			modal.bind('reveal:open', function () {
			  modalBG.unbind('click.modalEvent');
				$('.' + options.dismissmodalclass).unbind('click.modalEvent');
				if(!locked) {
					lockModal();
					if(options.animation == "fadeAndPop") {
						modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
						modalBG.fadeIn(options.animationspeed/2);
						modal.delay(options.animationspeed/2).animate({
							"top": $(document).scrollTop()+topMeasure + 'px',
							"opacity" : 1
						}, options.animationspeed,unlockModal());					
					}
					if(options.animation == "fade") {
						modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure});
						modalBG.fadeIn(options.animationspeed/2);
						modal.delay(options.animationspeed/2).animate({
							"opacity" : 1
						}, options.animationspeed,unlockModal());					
					} 
					if(options.animation == "none") {
						modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure});
						modalBG.css({"display":"block"});	
						unlockModal()				
					}
				}
				modal.unbind('reveal:open');
			}); 	

			//Closing Animation
			modal.bind('reveal:close', function () {
			  if(!locked) {
					lockModal();
					if(options.animation == "fadeAndPop") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"top":  $(document).scrollTop()-topOffset + 'px',
							"opacity" : 0
						}, options.animationspeed/2, function() {
							modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});
							unlockModal();
						});					
					}  	
					if(options.animation == "fade") {
						modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
						modal.animate({
							"opacity" : 0
						}, options.animationspeed, function() {
							modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure});
							unlockModal();
						});					
					}  	
					if(options.animation == "none") {
						modal.css({'visibility' : 'hidden', 'top' : topMeasure});
						modalBG.css({'display' : 'none'});	
					}		
				}
				modal.unbind('reveal:close');
			});     
   	
/*---------------------------
 Open and add Closing Listeners
----------------------------*/
        	//Open Modal Immediately
    	modal.trigger('reveal:open')
			
			//Close Modal Listeners
			var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () {
			  modal.trigger('reveal:close')
			});
			
			if(options.closeonbackgroundclick) {
				modalBG.css({"cursor":"pointer"})
				modalBG.bind('click.modalEvent', function () {
				  modal.trigger('reveal:close')
				});
			}
			$('body').keyup(function(e) {
        		if(e.which===27){ modal.trigger('reveal:close'); } // 27 is the keycode for the Escape key
			});

// Animations Locks
			function unlockModal() { 
				locked = false;
			}
			function lockModal() {
				locked = true;
			}	
        });
    }
})(jQuery);
     

Bu kodla kapatta biliyordum
<script>setTimeout( function(){ parent.$('.pncr-kapat').click() },0000);</script> 
Cevaplar (0)
Bu soru için ilk cevabı sen yaz! +3 puan kazan :)
Cevap Yazın..

[code=css,php,sql,asp..]..kod..[/code] , [url=http:...com] , [img=resim linki]
[color=renk kodu]..yazı..[/color]

yabancı dizi izle tv ünitesi