Changeset 1857285
- Timestamp:
- 04/12/2018 04:21:07 PM (8 years ago)
- Location:
- jquery-autotarget
- Files:
-
- 4 edited
-
tags/1.0.0/readme.txt (modified) (2 diffs)
-
tags/1.0.0/wp.jquery.autoTarget.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp.jquery.autoTarget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
jquery-autotarget/tags/1.0.0/readme.txt
r1318146 r1857285 4 4 Requires at least: 3.0 5 5 Stable tag: 1.0.0 6 Tested up to: 4. 46 Tested up to: 4.9 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 13 13 == Description == 14 14 15 There is a little gotcha when you're writing standards compliant code, but still 16 want off-site links to open in new windows. XHTML 1.0 Strict deprecated the use 17 of the "target" attribute. Early versions of HTML5 also had this deprecation, 18 but have since brought it back. In either case, making sure the target attribute 19 is set on every off-site link can be tedious. 15 There is a little gotcha when you're writing standards compliant code, but still want off-site links to open in new windows. XHTML 1.0 Strict deprecated the use of the "target" attribute. Early versions of HTML5 also had this deprecation, but have since brought it back. In either case, making sure the target attribute is set on every off-site link can be tedious. 20 16 21 17 = Enter jQuery.autoTarget = 22 18 23 Instead of going through the tedium of ensuring your target attributes are set, 24 this jQuery plugin automatically scans all the links on a page, and sets the 25 attribute for you (target="_blank") if the href attributes domain isn't the same 26 as the domain the page is served from. Just to sweeten the deal, it also sets 27 any offsite link to have a class of "external-link", so you can style offsite 28 links in the manner of your choice. Easy-peasy. And it only weighs in at 29 272 bytes! 19 Instead of going through the tedium of ensuring your target attributes are set, this jQuery plugin automatically scans all the links on a page, and sets the attribute for you (target="_blank") if the href attributes domain isn't the same as the domain the page is served from. Just to sweeten the deal, it also sets any offsite link to have a class of "external-link", so you can style offsite links in the manner of your choice. Easy-peasy. And it only weighs in at 272 bytes! 30 20 31 21 = No-clobber = 32 22 33 Just in case, the script does not touch any link that already has a target set, 34 so if you're already doing something with the target attribute, this won't 35 clobber your extant work. 23 Just in case, the script does not touch any link that already has a target set, so if you're already doing something with the target attribute, this won't clobber your extant work. 36 24 37 25 = Use of jQuery.autoTarget in Non-WordPress Sites = 38 26 39 If you need it, my jQuery plugin sans wordpress plugin is available at 40 https://github.com/wknechtel/jQuery.autoTarget 27 If you need it, my jQuery plugin sans wordpress plugin is available at https://github.com/wknechtel/jQuery.autoTarget 41 28 42 29 == Installation == 43 30 44 Upload the plugin zip into your wordpress installation, or use the WordPress 45 search utility and install from within WordPress if your installation is set up 46 to work that way. Then activate the plugin. That's it! No configuration 47 whatsoever. 31 Upload the plugin zip into your wordpress installation, or use the WordPress search utility and install from within WordPress if your installation is set up to work that way. Then activate the plugin. That's it! No configuration whatsoever. 48 32 49 33 == Changelog == -
jquery-autotarget/tags/1.0.0/wp.jquery.autoTarget.php
r1047222 r1857285 13 13 * License: MIT 14 14 * 15 * Copyright (c) 2014 William Knechtel15 * Copyright (c) 2014-2018 William Knechtel 16 16 * 17 17 * Permission is hereby granted, free of charge, to any person obtaining a copy -
jquery-autotarget/trunk/readme.txt
r1318146 r1857285 4 4 Requires at least: 3.0 5 5 Stable tag: 1.0.0 6 Tested up to: 4. 46 Tested up to: 4.9 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 13 13 == Description == 14 14 15 There is a little gotcha when you're writing standards compliant code, but still 16 want off-site links to open in new windows. XHTML 1.0 Strict deprecated the use 17 of the "target" attribute. Early versions of HTML5 also had this deprecation, 18 but have since brought it back. In either case, making sure the target attribute 19 is set on every off-site link can be tedious. 15 There is a little gotcha when you're writing standards compliant code, but still want off-site links to open in new windows. XHTML 1.0 Strict deprecated the use of the "target" attribute. Early versions of HTML5 also had this deprecation, but have since brought it back. In either case, making sure the target attribute is set on every off-site link can be tedious. 20 16 21 17 = Enter jQuery.autoTarget = 22 18 23 Instead of going through the tedium of ensuring your target attributes are set, 24 this jQuery plugin automatically scans all the links on a page, and sets the 25 attribute for you (target="_blank") if the href attributes domain isn't the same 26 as the domain the page is served from. Just to sweeten the deal, it also sets 27 any offsite link to have a class of "external-link", so you can style offsite 28 links in the manner of your choice. Easy-peasy. And it only weighs in at 29 272 bytes! 19 Instead of going through the tedium of ensuring your target attributes are set, this jQuery plugin automatically scans all the links on a page, and sets the attribute for you (target="_blank") if the href attributes domain isn't the same as the domain the page is served from. Just to sweeten the deal, it also sets any offsite link to have a class of "external-link", so you can style offsite links in the manner of your choice. Easy-peasy. And it only weighs in at 272 bytes! 30 20 31 21 = No-clobber = 32 22 33 Just in case, the script does not touch any link that already has a target set, 34 so if you're already doing something with the target attribute, this won't 35 clobber your extant work. 23 Just in case, the script does not touch any link that already has a target set, so if you're already doing something with the target attribute, this won't clobber your extant work. 36 24 37 25 = Use of jQuery.autoTarget in Non-WordPress Sites = 38 26 39 If you need it, my jQuery plugin sans wordpress plugin is available at 40 https://github.com/wknechtel/jQuery.autoTarget 27 If you need it, my jQuery plugin sans wordpress plugin is available at https://github.com/wknechtel/jQuery.autoTarget 41 28 42 29 == Installation == 43 30 44 Upload the plugin zip into your wordpress installation, or use the WordPress 45 search utility and install from within WordPress if your installation is set up 46 to work that way. Then activate the plugin. That's it! No configuration 47 whatsoever. 31 Upload the plugin zip into your wordpress installation, or use the WordPress search utility and install from within WordPress if your installation is set up to work that way. Then activate the plugin. That's it! No configuration whatsoever. 48 32 49 33 == Changelog == -
jquery-autotarget/trunk/wp.jquery.autoTarget.php
r1047222 r1857285 13 13 * License: MIT 14 14 * 15 * Copyright (c) 2014 William Knechtel15 * Copyright (c) 2014-2018 William Knechtel 16 16 * 17 17 * Permission is hereby granted, free of charge, to any person obtaining a copy
Note: See TracChangeset
for help on using the changeset viewer.