Title: Trigger favorite button with Jquery / Javascript
Last modified: September 1, 2016

---

# Trigger favorite button with Jquery / Javascript

 *  Resolved [Giovanni De Carlo](https://wordpress.org/support/users/giodc/)
 * (@giodc)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/trigger-favorite-button-with-jquery-javascript/)
 * Hi All,
 * i’m trying to include the favorite button, via php code, into a swipebox, to 
   allow user to favorite the “post” when the swipebox is open. Swipebox display
   a gallery of featured post images.
 * I successfully replaced the swipebox caption with an hidden div containing the
   swipebox button, on Desktop everything is working as expected, when on Mobile(
   ios with safari and chrome, android with chrome) the button do not trigger/clicked.
 * My idea in some way, is to trigger the favorite button “click” via jquery or 
   javascript, because maybe the problem is that on mobile device, the button is
   not working due the overlay of swipebox top bar, or maybe due a conflict with
   the swipe left or right jquery code included on the swipebox script.
 * Any idea on how to trigger? can be useful also to recreate something like the
   Instagram behaviour as double click on the image to favorite the post.
 * Many Thanks!
 * [https://wordpress.org/plugins/favorites/](https://wordpress.org/plugins/favorites/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Giovanni De Carlo](https://wordpress.org/support/users/giodc/)
 * (@giodc)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/trigger-favorite-button-with-jquery-javascript/#post-7667957)
 * I have succefully integrated it with swipebox, up and working also on mobile 
   devices.
 * Thanks.

Viewing 1 replies (of 1 total)

The topic ‘Trigger favorite button with Jquery / Javascript’ is closed to new replies.

 * ![](https://ps.w.org/favorites/assets/icon-128x128.png?rev=1677726)
 * [Favorites](https://wordpress.org/plugins/favorites/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/favorites/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/favorites/)
 * [Active Topics](https://wordpress.org/support/plugin/favorites/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/favorites/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/favorites/reviews/)

## Tags

 * [favorite](https://wordpress.org/support/topic-tag/favorite/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [trigger](https://wordpress.org/support/topic-tag/trigger/)

 * 1 reply
 * 1 participant
 * Last reply from: [Giovanni De Carlo](https://wordpress.org/support/users/giodc/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/trigger-favorite-button-with-jquery-javascript/#post-7667957)
 * Status: resolved