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


Recent Events
  • 30/04/2021 Important information

    We transferred to another hosting so if you are experiencing any problem let us know. We will fix it as soon as possible.

  • 25/11/2020 BLACK FRIDAY is coming

    BIG SALE, 35% discount for all our extensions. Use BF2020 coupon code. Hurry up the discount is valid till 7 December.


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 6 Years, 6 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 6 Years, 6 Months ago Karma: 733
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 6 Years, 6 Months ago Karma: 0
Thanks for this tip, that should work.
The administrator has disabled public write access.
 
Go to topPage: 1