jquery - Setting href target dynamically for fancybox? -


OK, I've already used fancybox with some success, but I was thinking that Can I surrender a value? I have put together a friction solution in a little bit, but the box tells me "The requested content can not be loaded, please try again later." What I have done, a different function has been created to trigger the launch of fancybox ....

First of all there is HTML of IFrame / Fancy Box (which does not see a user like a small button ):

Here is my code:

  & lt; An id = "link2" href = "ContentPage.aspx" & gt; & Lt; Input id = "btn1" type = "button" value = "gate content" class = "small bitcnt ccls" /> & Lt; / A & gt;   

.. and javascript:

  function launch kant (get rid of {var lnk = 'ContentPage.aspx? Act = Add & amp; Id = '+ rid; $ ('# Link2') attr ('href', lnk). //alert($(''#link2').attr('href ')); $ ("# Btn1") fancybox () trigger ('click') .. }   

and fancy box config:

  $ ("# btn1"). 'Fact': '55% ',' height ': '45%', 'auto scalley': wrong, 'model': true, 'transition' '(function () {$ ("# link2") : 'Elastic', 'infection': 'elastic' type ':' iframe ', onStart: function () {// return window confirmation (' continue? '); $. Fancybox.showActivity ();} , On-connect: function () {// warning ('cancelled!');}, Interrupted: function () {// warning ('full!'); $ .fancybox.hide activation ();}, on- Cleansup: Function () {// Return Window Confirmation ('Close?');}, OnClosed: Function () {// Warning ('Closer!');}});});   

Any ideas ???? Or am I seeing it wrongly?

first remove fancybox method and unnecessary spaces:

  Function launcher (get rid of) {var lnk = 'ContentPage.aspx? Act = Add & amp; Id = '+ rid; $ ('# Link2') attr ('href', lnk). . $ ("# Btn1") trigger ('click'); }    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -