dphelper 0.2.25 → 0.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data/list.json ADDED
@@ -0,0 +1,18 @@
1
+ [
2
+ {
3
+ "name" : "Anchors to onClick",
4
+ "description" : "Transform all anchor inside specific elements in to onClick (DOM)\r\n<br/>\r\n<br/>\r\n\r\nUsage: <br/>\r\n<br/>\r\n\r\n<code>\r\ndphelper.anchorToOnClick( \"your element(s)\" )\r\n</code>\r\n\r\n<br/>\r\n<br/>\r\nAutomatically all anchors became onClick. Use it at end off page or defer or after DOMs loaded \r\n\r\n",
5
+ "version" : "0.0.1",
6
+ "command" : "<command>\r\ndphelper.anchorToOnClick\r\n</command>",
7
+ "author" : "Dario Passariello",
8
+ "active" : true
9
+ },
10
+ {
11
+ "name" : "Arrays Tools",
12
+ "description" : "Transform all anchor inside specific elements in to onClick (DOM)\r\n<br/>\r\n<br/>\r\n\r\nUsage: <br/>\r\n<br/>\r\n\r\n<code>\r\ndphelper.array.set( \"your element(s)\" )\r\n</code>\r\n\r\n<br/>\r\n<br/>\r\nAutomatically all anchors became onClick. Use it at end off page or defer or after DOMs loaded \r\n\r\n",
13
+ "version" : "0.0.1",
14
+ "command" : "<command>\r\ndphelper.array \r\n</command>",
15
+ "author" : "Dario Passariello",
16
+ "active" : true
17
+ }
18
+ ]
package/init.js CHANGED
@@ -18,6 +18,8 @@
18
18
  // CREATE ROOT STORE
19
19
  const dphelper = window.dphelper = {};
20
20
 
21
+ window.dphelper.list = require('./data/list.json');
22
+
21
23
  // FIRST MESSAGE
22
24
  console.groupCollapsed( `%c${pjson.name} v${pjson.version}%c`,"color:orange","" );
23
25
  console.debug( `%c${pjson.name} v${pjson.version}%c by Dario Passariello started`,"color:orange","" );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "Many utils for your projects",
5
5
  "main": "index.js",
6
6
  "publishConfig": {},
@@ -10,26 +10,25 @@
10
10
  /***********************************************************************/
11
11
 
12
12
  window.dphelper.anchorToOnClick = function( container ){
13
- // const $ = require("jquery");
14
13
 
15
14
  $( container + ' a' ).each( function( index ) {
16
15
 
17
- let elem = $( this );
18
- let href = elem.attr( 'href' );
16
+ let elem = $( this );
17
+ let href = elem.attr( 'href' );
19
18
 
20
- if( href ){
21
- elem
22
- .on( 'mouseup', function(){
23
- Loader( 'body' , null );
24
- })
25
- .css('cursor','pointer')
26
- .addClass( dphelper.pathRail()[3].replace(/\//g, '') )
27
- .removeAttr( 'href' )
19
+ if( href ){
20
+ elem
21
+ .on( 'mouseup', function(){
22
+ Loader( 'body' , null );
23
+ })
24
+ .css('cursor','pointer')
25
+ .addClass( dphelper.pathRail()[3].replace(/\//g, '') )
26
+ .removeAttr( 'href' )
28
27
  .on( 'click', function(){
29
28
  window.location.href = href;
30
29
  window.history.pushState('', '', href);
31
30
  });
32
- }
31
+ }
33
32
 
34
33
  });
35
34