Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
home
/
getwphos
/
www
/
milceticarch
/
wp-content
/
themes
/
aalto
/
assets
/
js
/
modules
/
File Content:
like.js
(function($) { 'use strict'; var like = {}; like.edgtfOnDocumentReady = edgtfOnDocumentReady; $(document).ready(edgtfOnDocumentReady); /** * All functions to be called on $(document).ready() should be in this function **/ function edgtfOnDocumentReady() { edgtfLikes(); } function edgtfLikes() { $(document).on('click','.edgtf-like', function() { var likeLink = $(this), id = likeLink.attr('id'), postID = likeLink.data('post-id'), type = ''; if ( likeLink.hasClass('liked') ) { return false; } if (typeof likeLink.data('type') !== 'undefined') { type = likeLink.data('type'); } var dataToPass = { action: 'aalto_edge_like', likes_id: id, type: type, like_nonce: $('#edgtf_like_nonce_'+postID).val() }; var like = $.post(edgtfGlobalVars.vars.edgtfAjaxUrl, dataToPass, function( data ) { likeLink.html(data).addClass('liked').attr('title', 'You already like this!'); }); return false; }); } })(jQuery);
Submit
FILE
FOLDER
Name
Size
Permission
Action
plugins
---
0755
common.js
41889 bytes
0644
global.js
4486 bytes
0644
like.js
1273 bytes
0644
N4ST4R_ID | Naxtarrr