Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys,
I'd like to remove the rel="lightbox" attribute for a specific anker-item. If I remove the attr via jQuery, the lightbox is loaded anyway. Same the other way round: adding rel="lightbox", the lightbox is not loading.
Any ideas on how to specifically edit the rel-attributes?
Thanks!
PS: Paths won't help, I'm actually trying to deactivate the lightbox for mobile for a specific link.
Comments
Comment #0.0
quotientix CreditAttribution: quotientix commentedtext change
Comment #1
gifad CreditAttribution: gifad commentedIt seems that your jQuery code executes after Lightbox2 scripts, so it has no effect;
Fortunately, Lightbox2 uses default options for drupal_add_js(), except "scope”, defined by
;
So you just have to read drupal_add_js api documentation to position your code just ahead…
Comment #1.0
gifad CreditAttribution: gifad commentedText change