Version Description
- Minified javascript for faster page loads
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.4.4 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.4
- collapse-o-matic.php +2 -9
- collapse.js +1 -10
- collapse.min.js +1 -0
- images/arrow-down-dark.png +0 -0
- images/arrow-up-dark.png +0 -0
- images/arrows.psd +0 -0
- readme.txt +9 -3
collapse-o-matic.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
6 |
-
Version: 1.4.
|
7 |
Author: twinpictures, baden03
|
8 |
Author URI: http://twinpictures.de/
|
9 |
License: GPL2
|
@@ -32,7 +32,7 @@ function collapsTronicInit() {
|
|
32 |
$plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
|
33 |
if (!is_admin()){
|
34 |
//collapse script
|
35 |
-
wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.3.
|
36 |
wp_enqueue_script('collapseomatic-js');
|
37 |
|
38 |
//css
|
@@ -150,13 +150,6 @@ function collapsTronic($atts, $content = null){
|
|
150 |
return $retStr;
|
151 |
}
|
152 |
|
153 |
-
/*
|
154 |
-
add_shortcode('expand', 'collapsTronic');
|
155 |
-
for ($i=1; $i<30; $i++) {
|
156 |
-
add_shortcode('expandsub'.$i, 'collapsTronic');
|
157 |
-
}
|
158 |
-
*/
|
159 |
-
|
160 |
//add the filter to the sidebar widgets
|
161 |
add_filter('widget_text', 'do_shortcode');
|
162 |
?>
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
6 |
+
Version: 1.4.4
|
7 |
Author: twinpictures, baden03
|
8 |
Author URI: http://twinpictures.de/
|
9 |
License: GPL2
|
32 |
$plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
|
33 |
if (!is_admin()){
|
34 |
//collapse script
|
35 |
+
wp_register_script('collapseomatic-js', $plugin_url.'/collapse.min.js', array ('jquery'), '1.3.5' );
|
36 |
wp_enqueue_script('collapseomatic-js');
|
37 |
|
38 |
//css
|
150 |
return $retStr;
|
151 |
}
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
//add the filter to the sidebar widgets
|
154 |
add_filter('widget_text', 'do_shortcode');
|
155 |
?>
|
collapse.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* jQuery Collapse-O-Matic v1.3.
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2012, Twinpictures
|
@@ -246,18 +246,9 @@ jQuery(document).ready(function() {
|
|
246 |
|
247 |
//do we have a find me?
|
248 |
jQuery('.find-me').click(function() {
|
249 |
-
//event.preventDefault();
|
250 |
//get the top offset of the target anchor
|
251 |
var thisid = jQuery(this).attr('id');
|
252 |
var offset_top = jQuery('#find-'+thisid).attr('name');
|
253 |
-
//alert(offset_top);
|
254 |
-
//var target_offset = jQuery(this).offset();
|
255 |
-
//var target_position = jQuery(this).position();
|
256 |
-
//var target_top_offset = target_offset.top;
|
257 |
-
//var target_top_position = target_position.top;
|
258 |
-
//alert('target_top_offset: ' + target_top_offset + ' and target_top_position: ' + target_top_position);
|
259 |
-
//goto that anchor by setting the body scroll top to anchor top
|
260 |
jQuery('html, body').animate({scrollTop:offset_top}, 500);
|
261 |
-
//alert("please scroll to me");
|
262 |
});
|
263 |
});
|
1 |
/*!
|
2 |
+
* jQuery Collapse-O-Matic v1.3.5
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2012, Twinpictures
|
246 |
|
247 |
//do we have a find me?
|
248 |
jQuery('.find-me').click(function() {
|
|
|
249 |
//get the top offset of the target anchor
|
250 |
var thisid = jQuery(this).attr('id');
|
251 |
var offset_top = jQuery('#find-'+thisid).attr('name');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
jQuery('html, body').animate({scrollTop:offset_top}, 500);
|
|
|
253 |
});
|
254 |
});
|
collapse.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
var durration='fast';jQuery(document).ready(function(){jQuery('.force_content_collapse').each(function(index){jQuery(this).css('display','none')});jQuery('.collapseomatic:not(.colomat-close)').each(function(index){var thisid=jQuery(this).attr('id');jQuery('#target-'+thisid).css('display','none')});jQuery('.collapseomatic.colomat-close').each(function(index){var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}});jQuery('.find-me').each(function(index){var thisid=jQuery(this).attr('id');if(!jQuery('#find-'+thisid).attr('name')){var target_offset=jQuery(this).offset();var target_top_offset=target_offset.top;jQuery('#find-'+thisid).attr('name',target_top_offset)}});jQuery('.content_collapse_wrapper').each(function(index){jQuery(this).css('display','inline')});jQuery('.collapseomatic').hover(function(){jQuery(this).addClass("colomat-hover")},function(){jQuery(this).removeClass("colomat-hover")});jQuery('.collapseomatic').click(function(){var id=jQuery(this).attr('id');if(id.indexOf('bot-')!='-1'){id=id.substr(4);jQuery('#'+id).toggleClass('colomat-close')}else{jQuery(this).toggleClass('colomat-close')}if(jQuery("#swap-"+id).length>0){swapTitle(this,id)}jQuery('#target-'+id).slideToggle(durration,function(){});if(jQuery(this).attr('rel')!==undefined){var rel=jQuery(this).attr('rel');if(rel.indexOf('-highlander')!='-1'){closeOtherMembers(rel,id)}else{closeOtherGroups(rel)}}});function swapTitle(obj,id){var orightml=jQuery(obj).html();var swaphtml=jQuery("#swap-"+id).html();jQuery(obj).html(swaphtml);jQuery("#swap-"+id).html(orightml);if(swaphtml.indexOf("<cufon")!=-1){var trigelem=jQuery(this).get(0).tagName;Cufon.replace(trigelem)}}function closeOtherGroups(rel){jQuery('.collapseomatic[rel!="'+rel+'"]').each(function(index){if(jQuery(this).hasClass('colomat-close')&&jQuery(this).attr('rel')!==undefined){jQuery(this).removeClass('colomat-close');var id=jQuery(this).attr('id');if(jQuery("#swap-"+id).length>0){swapTitle(this,id)}jQuery('#target-'+id).slideToggle(durration,function(){});var ancestors=jQuery('.collapseomatic','#target-'+id);ancestors.each(function(index){jQuery(this).removeClass('colomat-close');var thisid=jQuery(this).attr('id');jQuery('#target-'+thisid).css('display','none')})}})}function closeOtherMembers(rel,id){jQuery('.collapseomatic[rel="'+rel+'"]').each(function(index){if(jQuery(this).attr('id')!=id&&jQuery(this).hasClass('colomat-close')&&jQuery(this).attr('rel')!==undefined){jQuery(this).removeClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).slideToggle(durration,function(){});var ancestors=jQuery('.collapseomatic','#target-'+id);ancestors.each(function(index){jQuery(this).removeClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).css('display','none')})}})}var myFile=document.location.toString();if(myFile.match('#')){var myAnchor='#'+myFile.split('#')[1];jQuery(myAnchor).click()}jQuery('.expandall').click(function(){if(jQuery(this).attr('rel')!==undefined){var rel=jQuery(this).attr('rel');jQuery('.collapseomatic[rel="'+rel+'"].collapseomatic:not(.colomat-close)').each(function(index){jQuery(this).addClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).slideToggle(durration,function(){})})}else{jQuery('.collapseomatic:not(.colomat-close)').each(function(index){jQuery(this).addClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).slideToggle(durration,function(){})})}});jQuery('.collapseall').click(function(){if(jQuery(this).attr('rel')!==undefined){var rel=jQuery(this).attr('rel');jQuery('.collapseomatic[rel="'+rel+'"].collapseomatic.colomat-close').each(function(index){jQuery(this).removeClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).slideToggle(durration,function(){})})}else{jQuery('.collapseomatic.colomat-close').each(function(index){jQuery(this).removeClass('colomat-close');var thisid=jQuery(this).attr('id');if(jQuery("#swap-"+thisid).length>0){swapTitle(this,thisid)}jQuery('#target-'+thisid).slideToggle(durration,function(){})})}});jQuery('.find-me').click(function(){var thisid=jQuery(this).attr('id');var offset_top=jQuery('#find-'+thisid).attr('name');jQuery('html, body').animate({scrollTop:offset_top},500)})});
|
images/arrow-down-dark.png
ADDED
Binary file
|
images/arrow-up-dark.png
ADDED
Binary file
|
images/arrows.psd
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,14 +4,14 @@ Contributors: twinpictures, baden03
|
|
4 |
Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures
|
6 |
Requires at least: 2.8
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 1.4.
|
9 |
|
10 |
Remove clutter, save space: display and hide additional content in a SEO friendly way by wrapping content in an [expand] shortcode.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options and attribute demos</a> are available, as well as <a href='http://wordpress.org/
|
15 |
|
16 |
== Installation ==
|
17 |
|
@@ -44,6 +44,9 @@ No. Not even close.
|
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
47 |
= 1.4.3 =
|
48 |
* Added the findme attribute to auto scroll to start of expanded items
|
49 |
|
@@ -144,6 +147,9 @@ No. Not even close.
|
|
144 |
|
145 |
== Upgrade Notice ==
|
146 |
|
|
|
|
|
|
|
147 |
= 1.4.3 =
|
148 |
* added findme attribute to autoscroll to expanded elements
|
149 |
|
4 |
Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures
|
6 |
Requires at least: 2.8
|
7 |
+
Tested up to: 3.4
|
8 |
+
Stable tag: 1.4.4
|
9 |
|
10 |
Remove clutter, save space: display and hide additional content in a SEO friendly way by wrapping content in an [expand] shortcode.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options and attribute demos</a> are available, as well as <a href='http://wordpress.org/support/plugin/jquery-collapse-o-matic'>free community</a> and <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/support/'>premium support</a>. This plug-in was originally inspired by DrLebowski's Collapsing Objects.
|
15 |
|
16 |
== Installation ==
|
17 |
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 1.4.4 =
|
48 |
+
* Minified javascript for faster page loads
|
49 |
+
|
50 |
= 1.4.3 =
|
51 |
* Added the findme attribute to auto scroll to start of expanded items
|
52 |
|
147 |
|
148 |
== Upgrade Notice ==
|
149 |
|
150 |
+
= 1.4.4 =
|
151 |
+
* JavaScript has been minified for faster page loads
|
152 |
+
|
153 |
= 1.4.3 =
|
154 |
* added findme attribute to autoscroll to expanded elements
|
155 |
|