javascript - Fancybox: Different url for different popup -


i have page box avery box have popup (onclick).

my issue need every popup have different url.

the site in php(smarty) , boxes generate loop.

someone know if possible define different url every popup generated?

this code:

<div class="container"> <div class="row">     <div class="row_content">         {assign var=index value=0}         {foreach from=$case_studies key=myid item=data}          <div class="news_column">             <div class="item_news">                 <a title="<b>{$data.case_study_titolo|upper}</b>.<br> {$data.case_study_descrizione}" class="fancybox-effects-c" href="{$data.src_lb}">                     <img alt="{$data.case_study_titolo} sviluppato per {$data.cliente_titolo} " src="{$data.src_home}">                     <h1>{$data.case_study_titolo}</h1>                     <p>{$data.case_study_short}</p>                     <h2>{$data.categoria_titolo}</h2>                 </a>             </div>          </div>          {assign var=index value=$index+1}          {if is_int($index/3)}              <div class="separatore"></div>          {/if}         {/foreach}         <div class='clr' style='height:100px'></div>         <div style='text-align: center; margin-top: -50px;'>             <a href='{$smarty.const.url}progetti'>                 <img src='{$smarty.const.link_deveyes}images/punti.jpg' alt='dot'>             </a>         </div>     </div> </div>  </div>             <div class='row_shadow'></div>             <div class="separatore" style="height: 50px"></div> <script type="text/javascript"> /* $('.item_news a').click(function unablelink(e) {     if ($(window).width() < 1034 ) {         e.preventdefault();     } });  */  $(document).ready(function(){ //         app.init(); //         gallery.init(); /*  *  simple image gallery. uses default settings  */  $('.fancybox').fancybox();  /*  *  different effects  */  // change title type, overlay closing speed $(".fancybox-effects-a").fancybox({ helpers: { title : { type : 'outside' }, overlay : { speedout : 0 } } });  // disable opening , closing animations, change title type $(".fancybox-effects-b").fancybox({ openeffect  : 'none', closeeffect : 'none',  helpers : { title : { type : 'over' } } });  // set custom style, close if clicked, change title type , overlay color $(".fancybox-effects-c").fancybox({ wrapcss    : 'fancybox-custom', closeclick : true,  openeffect : 'none',  helpers : { title : { type : 'inside' }, overlay : { css : { 'background' : 'rgba(118,168,187,0.45)' } } } });  // remove padding, set opening , closing animations, close if clicked , disable    overlay $(".fancybox-effects-d").fancybox({ padding: 0,  openeffect : 'elastic', openspeed  : 150,  closeeffect : 'elastic', closespeed  : 150,  closeclick : true,  helpers : { overlay : null } });  /* *  button helper. disable animations, hide close button, change title type , content */  $('.fancybox-buttons').fancybox({ openeffect  : 'none', closeeffect : 'none',  preveffect : 'none', nexteffect : 'none',  closebtn  : false,  helpers : { title : { type : 'inside' }, buttons : {} },  afterload : function() { this.title = 'image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? '     - ' + this.title : ''); } });   /* *  thumbnail helper. disable animations, hide close button, arrows , slide next     gallery item if clicked */  $('.fancybox-thumbs').fancybox({ preveffect : 'none', nexteffect : 'none',  closebtn  : false, arrows    : false, nextclick : true,  helpers : { thumbs : { width  : 50, height : 50 } } });  /* *  media helper. group items, disable animations, hide arrows, enable media , button    helpers. */ $('.fancybox-media') .attr('rel', 'media-gallery') .fancybox({ openeffect : 'none', closeeffect : 'none', preveffect : 'none', nexteffect : 'none',  arrows : false, helpers : { media : {}, buttons : {} } });  /* *  open manually */  $("#fancybox-manual-a").click(function() { $.fancybox.open('1_b.jpg'); });  $("#fancybox-manual-b").click(function() { $.fancybox.open({ href : 'iframe.html', type : 'iframe', padding : 5 }); });  $("#fancybox-manual-c").click(function() { $.fancybox.open([             { href : '1_b.jpg', title : 'my title' }, { href : '2_b.jpg', title : '2nd title' }, { href : '3_b.jpg' } ], { helpers : { thumbs : { width: 75, height: 50 } } }); }); } ); /* $('a').click(function unablelink(e) {     if ($(window).width() < 1034 ) {         e.preventdefault();     } }); */ $('a').click(function () { if ($(window).width() < 768 ) { $("#mainmenu2").slideup('fast'); } });  </script> 


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -