mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
get a post component by any of its attributes
This commit is contained in:
@@ -5,7 +5,7 @@ var components = components || {};
|
||||
(function() {
|
||||
components.core = {
|
||||
'post': function(name, value) {
|
||||
return $('[data-' + name + '="' + value + '"]');
|
||||
return value ? $('[data-' + name + '="' + value + '"]') $('[data-' + name + ']');
|
||||
},
|
||||
'post/content': function(pid) {
|
||||
var el = components.core.post('pid', pid).find('[component="post/content"]');
|
||||
|
||||
Reference in New Issue
Block a user