wzr1one Posted October 1, 2013 Share Posted October 1, 2013 Siema, chciałbym zrobić wyskakujący POPUP tylko w IE o tym, ze strona nie wyświetla się poprawnie na tej przegladarce. Ma ktoś jakiś moduł do tego albo pomysł jak to zrobić ? Link to comment Share on other sites More sharing options...
Krystian Podemski Posted October 1, 2013 Share Posted October 1, 2013 Zakładam że skrypt do popup posiadasz także teraz trzeba ograniczyć go tylko do wyświetlania pod daną przeglądarką, ten temat Ci pomoże: http://stackoverflow.com/questions/4411551/if-browser-is-internet-explorer-run-an-alternative-script-instead Link to comment Share on other sites More sharing options...
Kuras Posted October 1, 2013 Share Posted October 1, 2013 A może coś takiego... <!--[if lte IE 7]> ble...ble..ble... <![endif]--> Link to comment Share on other sites More sharing options...
wzr1one Posted October 1, 2013 Author Share Posted October 1, 2013 (edited) No właśnie liczyłem na jakiś prosty skrypt, który by nawet nie wyglądał Ewentualnie moduł do dostosowania, ale skorzystałem z tego w takim razie http://jqueryui.com/dialog/ Tzn wiem o tym skrypcie if ie.... chodziło raczej o to, czy ktoś tego używa i ewentualnie użyczy Bo np. też znalazł Edited October 1, 2013 by wzr1one (see edit history) Link to comment Share on other sites More sharing options...
Kuras Posted October 1, 2013 Share Posted October 1, 2013 Ja kiedyś używałem takiego rozwiązania http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/ Z warunkiem... <!--[if lte IE 7]> ble...ble..ble... <![endif]--> Moja rada to poszukaj czegoś lżejszego... niż jquery UI Link to comment Share on other sites More sharing options...
wzr1one Posted October 1, 2013 Author Share Posted October 1, 2013 No własnie próbuje, coś jakoś to zrobić, nie mogę znaleźć żadnego, bez używania jquery, a sam raczej tego nie napisze ;< Link to comment Share on other sites More sharing options...
wzr1one Posted October 1, 2013 Author Share Posted October 1, 2013 (edited) Dobra, znalazłem fajny skrypt, dostosowałem go pod swoje rzeczy teraz tylko musze Cookie dowalić EDIT mam kod <!--[if lte IE 9]> {literal} <link rel="stylesheet" href="http://iform.com.pl/popup/res/colorbox.css" /> <script type="text/javascript" src="http:/iform.com.pl/js/jquery/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="http://iform.com.pl/popup/res/jquery.colorbox-min.js"></script> <script type="text/javascript"> $(document).ready(function(){ setTimeout(function() { $.fn.colorbox({href:"http://iform.com.pl/popup/res/dlaie.html", open:true}); }, 1500); }); </script> {/literal} <![endif]--> Chciałbym zrobić, aby po kliknięciu w "x" - który jest w skrypcie dodało cookie, a później przy odwiedzeniu strony, aby to okienko się nie wyświetlało, wie ktoś jak to zrobić ? - tak szukam gotowego rozwiązania, bądź grubej podpowiedzi. Kod java dla colorbox. // ColorBox v1.3.20.2 - jQuery lightbox plugin // (c) 2012 Jack Moore - jacklmoore.com // License: http://www.opensource.org/licenses/mit-license.php (function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return 0>c?b+c:c}function _(a,{return Math.round((/%/.test(a)?("x"===b?z.width():z.height())/100:1)*parseInt(a,10))}function ab(a){return K.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b,c=a.data(P,e);null==c?(K=a.extend({},d),console&&console.log&&console.log("Error: cboxElement missing settings object")):K=a.extend({},c);for(b in K)a.isFunction(K[b])&&"on"!==b.slice(0,2)&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||a(P).data("rel")||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,"string"==typeof K.href&&(K.href=a.trim(K.href))}function cb(b,c){a.event.trigger(,c&&c.call(P)}function db(){var a,d,e,b=f+"Slideshow_",c="click."+f;K.slideshow&&y[1]?(d=function(){F.html(K.slideshowStop).unbind(c).bind(j,function(){(K.loop||y[Q+1])&&(a=setTimeout(W.next,K.slideshowSpeed))}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.html(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function eb({U||(P=b,bb(),y=a(P),Q=0,"nofollow"!==K.rel&&(y=a("."+g).filter(function(){var c,b=a.data(this,e);return b&&(c=a(this).data("rel")||b.rel||this.rel),c===K.rel}),Q=y.index(P),-1===Q&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),cb(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function fb(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,db),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,))}function gb(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(.bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&27===b&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(37===b?(a.preventDefault(),H.click()):39===b&&(a.preventDefault(),G.click()))}),a(.delegate("."+g,"click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),eb(this))})),!0):!1}var q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,Y,d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",X="div";a.colorbox||(a(fb),W=a.fn[e]=a[e]=function(b,c){var f=this;if(b=b||{},fb(),gb()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,)}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&eb(f[0])}return f},W.position=function(a,{function j(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c,h,i,d=0,e=0,g=r.offset();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),h=z.scrollTop(),i=z.scrollLeft(),K.fixed&&!o?(g.top-=h,g.left-=i,r.css({position:"fixed"})):(d=h,e=i,r.css({position:"absolute"})),e+=K.right!==!1?Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?_(K.left,"x"):Math.round(Math.max(z.width()-K.w-O-M,0)/2),d+=K.bottom!==!1?Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?_(K.top,"y"):Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:g.top,left:g.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",c={width:K.w+O,height:K.h+N,top:d,left:e},0===a&&r.css(c),r.dequeue().animate(c,{duration:a,complete:function(){j(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){j(this)[spam-filter])},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),a.innerHeight||a.height||(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position("none"===K.transition?0:K.speed))},W.prep=function({function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(S){var c,d="none"===K.transition?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(,A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return"hidden"!==this.style.visibility}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function s(){n&&r[0].style.removeAttribute("filter")}var b,c,h,l,o,p,q,g=y.length,i="frameBorder",k="allowTransparency";if(S){if(l=function(){clearTimeout(V),C.detach().hide(),cb(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show(),g>1){if("string"==typeof K.current&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||g-1>Q?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show(),K.preloading)for(b=[$(-1),$(1)];c=y[b.pop()];)q=a.data(c,e),q&&q.href?(o=q.href,a.isFunction(o)&&(o=o.call(c)))=c.href,ab(o)&&(p=new Image,p.src=o)}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),K.scrolling||(h.scrolling="no"),a(h).attr({src:K.href,name:(new Date).getTime(),"class":f+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",l).one(m,function(){h.src="//about:blank"}).appendTo(A),K.fastIframe&&a(h).trigger("load")):l(),"fade"===K.transition?r.fadeTo(d,1,s):s()[spam-filter],"fade"===K.transition?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)[spam-filter],W.load=function({var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),cb(m),cb(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show().appendTo(t)},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ab(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").html(K.imgError))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c){e("error"===c?Z(X,"Error").html(K.xhrError):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,cb(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),cb(m),A.remove(),setTimeout(function(){U=!1,cb(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g),a(.undelegate("."+g)},W.element=function(){return a(P)},W.settings=d)})(jQuery,document,window); Edited October 2, 2013 by wzr1one (see edit history) Link to comment Share on other sites More sharing options...
wzr1one Posted October 2, 2013 Author Share Posted October 2, 2013 Podbijam, bo chyba nie wyświetla się po edycie, że nowy post a poprzedni nic nie wnosił Link to comment Share on other sites More sharing options...
Recommended Posts