Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Fancybox call from jQuery
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Fancybox call from jQuery
#53817
Fancybox call from jQuery 9 Years, 8 Months ago Karma: 0
I have to update a part of a website page with a {fancybox} inside. Of course, after the page is loaded, the {fancybox} is translated into a <a href..> with a fb class. For example:
Code:

<a href="/images/test1.jpg" class=" fb_5506a1087cfd6" data-fancybox-group="gr_5506a1087f75e" title="test1"><img  src="/images/test1.jpg" alt="test1" width="150" height="150"></a>

I now make an Ajax call to the server to retrieve another image to display, for example test2.jpg.
What is the jQuery syntax I could use to make a new "fancybox" <a href...> call to that new image test2.jpg.
The problem for me is, because the call generated by fancybox for the first <a href="/images/test1.jpg" ...> does not have an item id, I cannot retrieve the class used for that first <a href>.
I tried giving an id into the first fancybox ( {fancybox id="myID" url=".."} ) but this id "myID" gets lost after the translation by fancybox.

Regards
Stephan.
The administrator has disabled public write access.
 
#53818
Re:Fancybox call from jQuery 9 Years, 8 Months ago Karma: 760
Hello,

It is possible to "class" parameter for {fancybox} tag to specify a CSS class which will be added to <A> tag. You can add an unique class name and get the element by CSS class name (jQuery supports this ability).

Regards,
ARI Soft
The administrator has disabled public write access.
 
#53819
Re:Fancybox call from jQuery 9 Years, 8 Months ago Karma: 0
Thanks for this tip, that should work.
The administrator has disabled public write access.
 
Go to topPage: 1