Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <a onclick="returnCategory($(this).attr('data-category-id'))" data-category-id="15">Tablets</a>
  2.  
  3. function returnCategory(categoryId) {
  4. return categoryId;
  5. }
  6.  
  7. function showPopup() {
  8. $.fancybox({
  9. href: 'popup.php',
  10. type: 'ajax',
  11. width: '90%',
  12. height: '100%',
  13. beforeClose : function () {
  14. categoryId = returnCategory();
  15. alert("Required category Id is :" + categoryId);
  16. },
  17. });
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement