Version Description
- Bug Fix for the new trigpos attribute, stupid, stupid, stupid
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.3.16 |
Comparing to | |
See all releases |
Code changes from version 1.4.4 to 1.3.16
- collapse-o-matic.php +27 -35
- collapse.js +110 -78
- collapse.min.js +0 -1
- images/arrow-down-dark.png +0 -0
- images/arrow-up-dark.png +0 -0
- images/arrows.psd +0 -0
- readme.txt +9 -57
- style-dark.css +0 -35
- style.css +0 -5
collapse-o-matic.php
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
-
Plugin URI: http://
|
5 |
-
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
6 |
-
Version: 1.
|
7 |
-
Author:
|
8 |
-
Author URI: http://twinpictures.de
|
9 |
License: GPL2
|
10 |
-
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2012 Twinpictures (www.twinpictures.de)
|
@@ -32,19 +31,18 @@ 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.
|
36 |
wp_enqueue_script('collapseomatic-js');
|
37 |
|
38 |
//css
|
39 |
-
wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.5
|
40 |
wp_enqueue_style( 'collapseomatic-css' );
|
41 |
}
|
42 |
|
43 |
add_shortcode('expand', 'collapsTronic');
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
}
|
48 |
|
49 |
//add the filter to the sidebar widgets
|
50 |
add_filter('widget_text', 'do_shortcode');
|
@@ -70,7 +68,6 @@ function collapsTronic($atts, $content = null){
|
|
70 |
'excerptpos' => 'below-trigger',
|
71 |
'excerpttag' => 'div',
|
72 |
'excerptclass' => '',
|
73 |
-
'findme' => '',
|
74 |
), $atts));
|
75 |
|
76 |
if($excerpt){
|
@@ -96,60 +93,55 @@ function collapsTronic($atts, $content = null){
|
|
96 |
if($expanded){
|
97 |
$trigclass .= ' colomat-close';
|
98 |
}
|
99 |
-
$
|
100 |
-
if($findme){
|
101 |
-
$trigclass .= ' find-me';
|
102 |
-
$offset = '';
|
103 |
-
if($findme != 'true' && $findme != 'auto'){
|
104 |
-
$offset = $findme;
|
105 |
-
}
|
106 |
-
$anchor = "<a id='find-".$id."' name='".$offset."'></a>\n";
|
107 |
-
}
|
108 |
-
$link = "<".$tag." class='collapseomatic ".$trigclass."' id='".$id."' ".$relatt." ".$altatt.">".$title."</".$tag.">".$anchor."\n";
|
109 |
if($swaptitle){
|
110 |
-
$link .=
|
111 |
}
|
112 |
$eDiv = '';
|
113 |
-
if($content){
|
114 |
-
$eDiv =
|
115 |
}
|
116 |
if($excerpt){
|
117 |
if($excerptpos == 'above-trigger'){
|
118 |
if($trigpos == 'below'){
|
119 |
-
$
|
120 |
}
|
121 |
else{
|
122 |
-
$
|
123 |
}
|
124 |
}
|
125 |
else if($excerptpos == 'below-trigger'){
|
126 |
if($trigpos == 'below'){
|
127 |
-
$
|
128 |
}
|
129 |
else{
|
130 |
-
$
|
131 |
}
|
132 |
}
|
133 |
else{
|
134 |
if($trigpos == 'below'){
|
135 |
-
$
|
136 |
}
|
137 |
else{
|
138 |
-
$
|
139 |
}
|
140 |
}
|
141 |
}
|
142 |
else{
|
143 |
if($trigpos == 'below'){
|
144 |
-
$
|
145 |
}
|
146 |
else{
|
147 |
-
$
|
148 |
}
|
149 |
}
|
150 |
-
return $retStr;
|
151 |
}
|
152 |
|
|
|
|
|
|
|
|
|
|
|
153 |
//add the filter to the sidebar widgets
|
154 |
add_filter('widget_text', 'do_shortcode');
|
155 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
+
Plugin URI: http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
|
5 |
+
Description: Collapse-O-Matic adds an `[expand]` shortcode that wraps content into a lovely, jQuery collapsible div.
|
6 |
+
Version: 1.3.16
|
7 |
+
Author: Twinpictures
|
8 |
+
Author URI: http://www.twinpictures.de
|
9 |
License: GPL2
|
|
|
10 |
*/
|
11 |
|
12 |
/* Copyright 2012 Twinpictures (www.twinpictures.de)
|
31 |
$plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
|
32 |
if (!is_admin()){
|
33 |
//collapse script
|
34 |
+
wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.3.0' );
|
35 |
wp_enqueue_script('collapseomatic-js');
|
36 |
|
37 |
//css
|
38 |
+
wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.5' );
|
39 |
wp_enqueue_style( 'collapseomatic-css' );
|
40 |
}
|
41 |
|
42 |
add_shortcode('expand', 'collapsTronic');
|
43 |
+
add_shortcode('expandsub1', 'collapsTronic');
|
44 |
+
add_shortcode('expandsub2', 'collapsTronic');
|
45 |
+
add_shortcode('expandsub3', 'collapsTronic');
|
|
|
46 |
|
47 |
//add the filter to the sidebar widgets
|
48 |
add_filter('widget_text', 'do_shortcode');
|
68 |
'excerptpos' => 'below-trigger',
|
69 |
'excerpttag' => 'div',
|
70 |
'excerptclass' => '',
|
|
|
71 |
), $atts));
|
72 |
|
73 |
if($excerpt){
|
93 |
if($expanded){
|
94 |
$trigclass .= ' colomat-close';
|
95 |
}
|
96 |
+
$link = '<'.$tag.' class="collapseomatic '.$trigclass.'" id="'.$id.'" '.$relatt.' '.$altatt.'>'.$title.'</'.$tag.'>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
if($swaptitle){
|
98 |
+
$link .= '<'.$tag.' id="swap-'.$id.'" style="display:none;">'.$swaptitle.'</'.$tag.'>';
|
99 |
}
|
100 |
$eDiv = '';
|
101 |
+
if($content != ' '){
|
102 |
+
$eDiv = '<div id="target-'.$id.'" class="collapseomatic_content '.$targclass.'">'.do_shortcode($content).'</div>';
|
103 |
}
|
104 |
if($excerpt){
|
105 |
if($excerptpos == 'above-trigger'){
|
106 |
if($trigpos == 'below'){
|
107 |
+
return $eDiv . $nibble . $link;
|
108 |
}
|
109 |
else{
|
110 |
+
return $nibble . $link . $eDiv;
|
111 |
}
|
112 |
}
|
113 |
else if($excerptpos == 'below-trigger'){
|
114 |
if($trigpos == 'below'){
|
115 |
+
return $eDiv . $link . $nibble;
|
116 |
}
|
117 |
else{
|
118 |
+
return $link . $nibble . $eDiv;
|
119 |
}
|
120 |
}
|
121 |
else{
|
122 |
if($trigpos == 'below'){
|
123 |
+
return $eDiv . $link . $nibble;
|
124 |
}
|
125 |
else{
|
126 |
+
return $link . $eDiv . $nibble;
|
127 |
}
|
128 |
}
|
129 |
}
|
130 |
else{
|
131 |
if($trigpos == 'below'){
|
132 |
+
return $eDiv . $link;
|
133 |
}
|
134 |
else{
|
135 |
+
return $link . $eDiv;
|
136 |
}
|
137 |
}
|
|
|
138 |
}
|
139 |
|
140 |
+
add_shortcode('expand', 'collapsTronic');
|
141 |
+
add_shortcode('expandsub1', 'collapsTronic');
|
142 |
+
add_shortcode('expandsub2', 'collapsTronic');
|
143 |
+
add_shortcode('expandsub3', 'collapsTronic');
|
144 |
+
|
145 |
//add the filter to the sidebar widgets
|
146 |
add_filter('widget_text', 'do_shortcode');
|
147 |
?>
|
collapse.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
-
* jQuery Collapse-O-Matic v1.3.
|
3 |
-
* http://
|
4 |
*
|
5 |
* Copyright 2012, Twinpictures
|
6 |
*
|
@@ -24,9 +24,8 @@
|
|
24 |
* THE SOFTWARE.
|
25 |
*/
|
26 |
|
27 |
-
var durration = 'fast';
|
28 |
-
|
29 |
jQuery(document).ready(function() {
|
|
|
30 |
//force collapse
|
31 |
jQuery('.force_content_collapse').each(function(index) {
|
32 |
jQuery(this).css('display', 'none');
|
@@ -37,24 +36,6 @@ jQuery(document).ready(function() {
|
|
37 |
var thisid = jQuery(this).attr('id');
|
38 |
jQuery('#target-'+thisid).css('display', 'none');
|
39 |
});
|
40 |
-
|
41 |
-
//inital swaptitle for pre-expanded elements
|
42 |
-
jQuery('.collapseomatic.colomat-close').each(function(index) {
|
43 |
-
var thisid = jQuery(this).attr('id');
|
44 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
45 |
-
swapTitle(this, thisid);
|
46 |
-
}
|
47 |
-
});
|
48 |
-
|
49 |
-
//initial position for find-me feature
|
50 |
-
jQuery('.find-me').each(function(index) {
|
51 |
-
var thisid = jQuery(this).attr('id');
|
52 |
-
if( !jQuery('#find-'+thisid).attr('name') ){
|
53 |
-
var target_offset = jQuery(this).offset();
|
54 |
-
var target_top_offset = target_offset.top;
|
55 |
-
jQuery('#find-'+thisid).attr('name', target_top_offset);
|
56 |
-
}
|
57 |
-
});
|
58 |
|
59 |
//Display the collapse wrapper... use to reverse the show-all on no JavaScript degredation.
|
60 |
jQuery('.content_collapse_wrapper').each(function(index) {
|
@@ -69,7 +50,6 @@ jQuery(document).ready(function() {
|
|
69 |
}
|
70 |
);
|
71 |
|
72 |
-
|
73 |
jQuery('.collapseomatic').click(function() {
|
74 |
//alert('phones ringin dude');
|
75 |
var id = jQuery(this).attr('id');
|
@@ -82,10 +62,19 @@ jQuery(document).ready(function() {
|
|
82 |
}
|
83 |
//check if the title needs to be swapped out
|
84 |
if(jQuery("#swap-"+id).length > 0){
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
-
jQuery('#target-'+id).slideToggle(
|
89 |
// Animation complete.
|
90 |
});
|
91 |
|
@@ -101,41 +90,44 @@ jQuery(document).ready(function() {
|
|
101 |
}
|
102 |
});
|
103 |
|
104 |
-
function swapTitle(obj, id){
|
105 |
-
var orightml = jQuery(obj).html();
|
106 |
-
var swaphtml = jQuery("#swap-"+id).html();
|
107 |
-
jQuery(obj).html(swaphtml);
|
108 |
-
jQuery("#swap-"+id).html(orightml);
|
109 |
-
|
110 |
-
//is cufon involved? if so, do that thing
|
111 |
-
if(swaphtml.indexOf("<cufon") != -1){
|
112 |
-
var trigelem = jQuery(this).get(0).tagName;
|
113 |
-
Cufon.replace(trigelem);
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
function closeOtherGroups(rel){
|
118 |
jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
|
119 |
//add close class if open
|
120 |
if(jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
121 |
jQuery(this).removeClass('colomat-close');
|
122 |
var id = jQuery(this).attr('id');
|
123 |
-
|
124 |
-
//check if the title needs to be swapped out
|
125 |
-
if(jQuery("#swap-"+id).length > 0){
|
126 |
-
swapTitle(this, id);
|
127 |
-
}
|
128 |
-
|
129 |
-
jQuery('#target-'+id).slideToggle(durration, function() {
|
130 |
// Animation complete.
|
131 |
});
|
132 |
|
133 |
//check if there are nested children that need to be collapsed
|
134 |
-
var
|
135 |
-
|
136 |
jQuery(this).removeClass('colomat-close');
|
137 |
var thisid = jQuery(this).attr('id');
|
138 |
-
jQuery('#target-'+thisid).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
})
|
140 |
}
|
141 |
});
|
@@ -148,26 +140,38 @@ jQuery(document).ready(function() {
|
|
148 |
//collapse the element
|
149 |
jQuery(this).removeClass('colomat-close');
|
150 |
var thisid = jQuery(this).attr('id');
|
151 |
-
|
152 |
-
//check if the title needs to be swapped out
|
153 |
-
if(jQuery("#swap-"+thisid).length > 0){
|
154 |
-
swapTitle(this, thisid);
|
155 |
-
}
|
156 |
-
|
157 |
-
jQuery('#target-'+thisid).slideToggle(durration, function() {
|
158 |
// Animation complete.
|
159 |
});
|
160 |
|
161 |
//check if there are nested children that need to be collapsed
|
162 |
-
var
|
163 |
-
|
164 |
jQuery(this).removeClass('colomat-close');
|
165 |
var thisid = jQuery(this).attr('id');
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
})
|
172 |
}
|
173 |
});
|
@@ -188,10 +192,19 @@ jQuery(document).ready(function() {
|
|
188 |
var thisid = jQuery(this).attr('id');
|
189 |
|
190 |
if(jQuery("#swap-"+thisid).length > 0){
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
}
|
193 |
|
194 |
-
jQuery('#target-'+thisid).slideToggle(
|
195 |
// Animation complete.
|
196 |
});
|
197 |
});
|
@@ -202,10 +215,19 @@ jQuery(document).ready(function() {
|
|
202 |
var thisid = jQuery(this).attr('id');
|
203 |
|
204 |
if(jQuery("#swap-"+thisid).length > 0){
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
|
208 |
-
jQuery('#target-'+thisid).slideToggle(
|
209 |
// Animation complete.
|
210 |
});
|
211 |
});
|
@@ -220,10 +242,19 @@ jQuery(document).ready(function() {
|
|
220 |
var thisid = jQuery(this).attr('id');
|
221 |
|
222 |
if(jQuery("#swap-"+thisid).length > 0){
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
-
jQuery('#target-'+thisid).slideToggle(
|
227 |
// Animation complete.
|
228 |
});
|
229 |
});
|
@@ -234,21 +265,22 @@ jQuery(document).ready(function() {
|
|
234 |
var thisid = jQuery(this).attr('id');
|
235 |
|
236 |
if(jQuery("#swap-"+thisid).length > 0){
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
-
jQuery('#target-'+thisid).slideToggle(
|
241 |
// Animation complete.
|
242 |
});
|
243 |
});
|
244 |
}
|
245 |
});
|
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 |
});
|
1 |
/*!
|
2 |
+
* jQuery Collapse-O-Matic v1.3.0
|
3 |
+
* http://www.twinpictures.de/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2012, Twinpictures
|
6 |
*
|
24 |
* THE SOFTWARE.
|
25 |
*/
|
26 |
|
|
|
|
|
27 |
jQuery(document).ready(function() {
|
28 |
+
|
29 |
//force collapse
|
30 |
jQuery('.force_content_collapse').each(function(index) {
|
31 |
jQuery(this).css('display', 'none');
|
36 |
var thisid = jQuery(this).attr('id');
|
37 |
jQuery('#target-'+thisid).css('display', 'none');
|
38 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
//Display the collapse wrapper... use to reverse the show-all on no JavaScript degredation.
|
41 |
jQuery('.content_collapse_wrapper').each(function(index) {
|
50 |
}
|
51 |
);
|
52 |
|
|
|
53 |
jQuery('.collapseomatic').click(function() {
|
54 |
//alert('phones ringin dude');
|
55 |
var id = jQuery(this).attr('id');
|
62 |
}
|
63 |
//check if the title needs to be swapped out
|
64 |
if(jQuery("#swap-"+id).length > 0){
|
65 |
+
var orightml = jQuery(this).html();
|
66 |
+
var swaphtml = jQuery("#swap-"+id).html();
|
67 |
+
jQuery(this).html(swaphtml);
|
68 |
+
jQuery("#swap-"+id).html(orightml);
|
69 |
+
|
70 |
+
//is cufon involved? if so, do that thing
|
71 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
72 |
+
var trigelem = jQuery(this).get(0).tagName;
|
73 |
+
Cufon.replace(trigelem);
|
74 |
+
}
|
75 |
}
|
76 |
|
77 |
+
jQuery('#target-'+id).slideToggle('fast', function() {
|
78 |
// Animation complete.
|
79 |
});
|
80 |
|
90 |
}
|
91 |
});
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
function closeOtherGroups(rel){
|
94 |
jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
|
95 |
//add close class if open
|
96 |
if(jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
97 |
jQuery(this).removeClass('colomat-close');
|
98 |
var id = jQuery(this).attr('id');
|
99 |
+
jQuery('#target-'+id).slideToggle('fast', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
// Animation complete.
|
101 |
});
|
102 |
|
103 |
//check if there are nested children that need to be collapsed
|
104 |
+
var child = jQuery('#target-'+id).children('span.collapseomatic');
|
105 |
+
child.each(function(index) {
|
106 |
jQuery(this).removeClass('colomat-close');
|
107 |
var thisid = jQuery(this).attr('id');
|
108 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
109 |
+
// Animation complete.
|
110 |
+
});
|
111 |
+
|
112 |
+
//check if there are nested grand children that need to be collapsed
|
113 |
+
var grandchild = jQuery('#target-'+thisid).children('span.collapseomatic');
|
114 |
+
grandchild.each(function(index) {
|
115 |
+
jQuery(this).removeClass('colomat-close');
|
116 |
+
var thatid = jQuery(this).attr('id');
|
117 |
+
jQuery('#target-'+thatid).slideToggle('fast', function() {
|
118 |
+
// Animation complete.
|
119 |
+
});
|
120 |
+
|
121 |
+
//check if there are nested great grand children that need to be collapsed
|
122 |
+
var greatgrandchild = jQuery('#target-'+thatid).children('span.collapseomatic');
|
123 |
+
greatgrandchild.each(function(index) {
|
124 |
+
jQuery(this).removeClass('colomat-close');
|
125 |
+
var theotherid = jQuery(this).attr('id');
|
126 |
+
jQuery('#target-'+theotherid).slideToggle('fast', function() {
|
127 |
+
// Animation complete.
|
128 |
+
});
|
129 |
+
})
|
130 |
+
})
|
131 |
})
|
132 |
}
|
133 |
});
|
140 |
//collapse the element
|
141 |
jQuery(this).removeClass('colomat-close');
|
142 |
var thisid = jQuery(this).attr('id');
|
143 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
// Animation complete.
|
145 |
});
|
146 |
|
147 |
//check if there are nested children that need to be collapsed
|
148 |
+
var child = jQuery('#target-'+id).children('span.collapseomatic');
|
149 |
+
child.each(function(index) {
|
150 |
jQuery(this).removeClass('colomat-close');
|
151 |
var thisid = jQuery(this).attr('id');
|
152 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
153 |
+
// Animation complete.
|
154 |
+
});
|
155 |
+
|
156 |
+
//check if there are nested grand children that need to be collapsed
|
157 |
+
var grandchild = jQuery('#target-'+thisid).children('span.collapseomatic');
|
158 |
+
grandchild.each(function(index) {
|
159 |
+
jQuery(this).removeClass('colomat-close');
|
160 |
+
var thatid = jQuery(this).attr('id');
|
161 |
+
jQuery('#target-'+thatid).slideToggle('fast', function() {
|
162 |
+
// Animation complete.
|
163 |
+
});
|
164 |
+
|
165 |
+
//check if there are nested great grand children that need to be collapsed
|
166 |
+
var greatgrandchild = jQuery('#target-'+thatid).children('span.collapseomatic');
|
167 |
+
greatgrandchild.each(function(index) {
|
168 |
+
jQuery(this).removeClass('colomat-close');
|
169 |
+
var theotherid = jQuery(this).attr('id');
|
170 |
+
jQuery('#target-'+theotherid).slideToggle('fast', function() {
|
171 |
+
// Animation complete.
|
172 |
+
});
|
173 |
+
})
|
174 |
+
})
|
175 |
})
|
176 |
}
|
177 |
});
|
192 |
var thisid = jQuery(this).attr('id');
|
193 |
|
194 |
if(jQuery("#swap-"+thisid).length > 0){
|
195 |
+
var orightml = jQuery(this).html();
|
196 |
+
var swaphtml = jQuery("#swap-"+thisid).html();
|
197 |
+
jQuery(this).html(swaphtml);
|
198 |
+
jQuery("#swap-"+thisid).html(orightml);
|
199 |
+
|
200 |
+
//is cufon involved? if so, do that thing
|
201 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
202 |
+
var trigelem = jQuery(this).get(0).tagName;
|
203 |
+
Cufon.replace(trigelem);
|
204 |
+
}
|
205 |
}
|
206 |
|
207 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
208 |
// Animation complete.
|
209 |
});
|
210 |
});
|
215 |
var thisid = jQuery(this).attr('id');
|
216 |
|
217 |
if(jQuery("#swap-"+thisid).length > 0){
|
218 |
+
var orightml = jQuery(this).html();
|
219 |
+
var swaphtml = jQuery("#swap-"+thisid).html();
|
220 |
+
jQuery(this).html(swaphtml);
|
221 |
+
jQuery("#swap-"+thisid).html(orightml);
|
222 |
+
|
223 |
+
//is cufon involved? if so, do that thing
|
224 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
225 |
+
var trigelem = jQuery(this).get(0).tagName;
|
226 |
+
Cufon.replace(trigelem);
|
227 |
+
}
|
228 |
}
|
229 |
|
230 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
231 |
// Animation complete.
|
232 |
});
|
233 |
});
|
242 |
var thisid = jQuery(this).attr('id');
|
243 |
|
244 |
if(jQuery("#swap-"+thisid).length > 0){
|
245 |
+
var orightml = jQuery(this).html();
|
246 |
+
var swaphtml = jQuery("#swap-"+thisid).html();
|
247 |
+
jQuery(this).html(swaphtml);
|
248 |
+
jQuery("#swap-"+thisid).html(orightml);
|
249 |
+
|
250 |
+
//is cufon involved? if so, do that thing
|
251 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
252 |
+
var trigelem = jQuery(this).get(0).tagName;
|
253 |
+
Cufon.replace(trigelem);
|
254 |
+
}
|
255 |
}
|
256 |
|
257 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
258 |
// Animation complete.
|
259 |
});
|
260 |
});
|
265 |
var thisid = jQuery(this).attr('id');
|
266 |
|
267 |
if(jQuery("#swap-"+thisid).length > 0){
|
268 |
+
var orightml = jQuery(this).html();
|
269 |
+
var swaphtml = jQuery("#swap-"+thisid).html();
|
270 |
+
jQuery(this).html(swaphtml);
|
271 |
+
jQuery("#swap-"+thisid).html(orightml);
|
272 |
+
|
273 |
+
//is cufon involved? if so, do that thing
|
274 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
275 |
+
var trigelem = jQuery(this).get(0).tagName;
|
276 |
+
Cufon.replace(trigelem);
|
277 |
+
}
|
278 |
}
|
279 |
|
280 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
281 |
// Animation complete.
|
282 |
});
|
283 |
});
|
284 |
}
|
285 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
});
|
collapse.min.js
DELETED
@@ -1 +0,0 @@
|
|
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
DELETED
Binary file
|
images/arrow-up-dark.png
DELETED
Binary file
|
images/arrows.psd
DELETED
Binary file
|
readme.txt
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
=== jQuery Collapse-O-Matic ===
|
2 |
|
3 |
-
Contributors:
|
4 |
-
Donate link: http://
|
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.
|
9 |
|
10 |
-
Remove clutter, save space: display and hide additional content in a SEO friendly way
|
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://
|
15 |
|
16 |
== Installation ==
|
17 |
|
@@ -21,18 +21,18 @@ Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]`
|
|
21 |
1. Test that the this plug-in meets your demanding needs.
|
22 |
1. Tweak the CSS to match your flavor.
|
23 |
1. Rate the plug-in and verify if it works at wordpress.org.
|
24 |
-
1. Leave a comment regarding bugs, feature request, cocktail recipes at http://
|
25 |
|
26 |
== Frequently Asked Questions ==
|
27 |
|
28 |
-
= I am a Social Netwookiee,
|
29 |
Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
|
30 |
|
31 |
= Does Twinpictures do the Twitter? =
|
32 |
Ah yes! <a href='http://twitter.com/#!/twinpictures'>@Twinpictures</a> does the twitter tweeting around here.
|
33 |
|
34 |
= How does one use the shortcode, exactly? =
|
35 |
-
A <a href='http://
|
36 |
|
37 |
= Is Galato the same as Ice Cream? =
|
38 |
No. Not even close.
|
@@ -44,30 +44,6 @@ No. Not even close.
|
|
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 |
-
|
53 |
-
= 1.4.2 =
|
54 |
-
* Added speed adjustment to the slideToggle
|
55 |
-
|
56 |
-
= 1.4.1 =
|
57 |
-
* Autoclose elements will now trigger SwapTitle
|
58 |
-
|
59 |
-
= 1.4 =
|
60 |
-
* Relaunched of plugin page on Twinpictures' Plugin Oven
|
61 |
-
|
62 |
-
= 1.3.18 =
|
63 |
-
* Added alternate style sheet for sites with dark backgrounds.
|
64 |
-
|
65 |
-
= 1.3.17 =
|
66 |
-
* Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
|
67 |
-
|
68 |
-
= 1.3.16.1 =
|
69 |
-
* Added noarrows class for better integration of images as triggers.
|
70 |
-
|
71 |
= 1.3.16 =
|
72 |
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
73 |
|
@@ -147,30 +123,6 @@ No. Not even close.
|
|
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 |
-
|
156 |
-
= 1.4.2 =
|
157 |
-
* added speed control to collapse/expand effect
|
158 |
-
|
159 |
-
= 1.4.1 =
|
160 |
-
* Swaptitle will be triggered by autoexpand/collapse events such as highlander grouping.
|
161 |
-
|
162 |
-
= 1.4 =
|
163 |
-
* Improved support and FAQs on Plugin Oven support page
|
164 |
-
|
165 |
-
= 1.3.18 =
|
166 |
-
* Added alternate style sheet for sites with dark backgrounds.
|
167 |
-
|
168 |
-
= 1.3.17 =
|
169 |
-
* Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
|
170 |
-
|
171 |
-
= 1.3.16.1 =
|
172 |
-
* Added noarrows class for better integration of images as triggers.
|
173 |
-
|
174 |
= 1.3.16 =
|
175 |
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
176 |
|
1 |
=== jQuery Collapse-O-Matic ===
|
2 |
|
3 |
+
Contributors: Twinpictures
|
4 |
+
Donate link: http://www.twinpictures.de/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.3.1
|
8 |
+
Stable tag: 1.3.16
|
9 |
|
10 |
+
Remove clutter, save space: display and hide additional content in a SEO friendly way. Collapse-O-Matic adds an `[expand]` shortcode that will wrap any content in an expanding and collapsing div.
|
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://www.twinpictures.de/jquery-collapse-o-matic-1-3/'>complete listing of shortcode options and attribute demos</a> are available. This plug-in was inspired by DrLebowski's Collapsing Objects.
|
15 |
|
16 |
== Installation ==
|
17 |
|
21 |
1. Test that the this plug-in meets your demanding needs.
|
22 |
1. Tweak the CSS to match your flavor.
|
23 |
1. Rate the plug-in and verify if it works at wordpress.org.
|
24 |
+
1. Leave a comment regarding bugs, feature request, cocktail recipes at http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
|
25 |
|
26 |
== Frequently Asked Questions ==
|
27 |
|
28 |
+
= I am a Social Netwookiee, do you have a Facebook page? =
|
29 |
Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
|
30 |
|
31 |
= Does Twinpictures do the Twitter? =
|
32 |
Ah yes! <a href='http://twitter.com/#!/twinpictures'>@Twinpictures</a> does the twitter tweeting around here.
|
33 |
|
34 |
= How does one use the shortcode, exactly? =
|
35 |
+
A <a href='http://www.twinpictures.de/jquery-collapse-o-matic-1-3/'>complete listing of shortcode options</a> has been provided to answer this exact question.
|
36 |
|
37 |
= Is Galato the same as Ice Cream? =
|
38 |
No. Not even close.
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
= 1.3.16 =
|
48 |
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
49 |
|
123 |
|
124 |
== Upgrade Notice ==
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
= 1.3.16 =
|
127 |
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
128 |
|
style-dark.css
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
.collapseomatic {
|
2 |
-
background-image: url(images/arrow-down-dark.png);
|
3 |
-
background-repeat: no-repeat;
|
4 |
-
padding: 0 0 10px 16px;
|
5 |
-
/*border: 1px dotted blue;*/
|
6 |
-
cursor: pointer;
|
7 |
-
}
|
8 |
-
.arrowright {
|
9 |
-
background-position: top right;
|
10 |
-
padding: 0 16px 10px 0;
|
11 |
-
}
|
12 |
-
.noarrow {
|
13 |
-
background-image: none !important;
|
14 |
-
padding: 0 0 10px 0;
|
15 |
-
}
|
16 |
-
.colomat-hover {
|
17 |
-
text-decoration: underline;
|
18 |
-
}
|
19 |
-
.colomat-close {
|
20 |
-
background-image: url(images/arrow-up-dark.png);
|
21 |
-
}
|
22 |
-
.collapseomatic_excerpt, .collapseomatic_content {
|
23 |
-
margin-top: 0px;
|
24 |
-
margin-left: 16px;
|
25 |
-
padding: 0px;
|
26 |
-
}
|
27 |
-
.content_collapse_wrapper {
|
28 |
-
display: none;
|
29 |
-
}
|
30 |
-
.collapseall, .expandall {
|
31 |
-
cursor: pointer;
|
32 |
-
}
|
33 |
-
.collapseall:hover, .expandall:hover {
|
34 |
-
text-decoration: underline;
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
CHANGED
@@ -2,17 +2,12 @@
|
|
2 |
background-image: url(images/arrow-down.png);
|
3 |
background-repeat: no-repeat;
|
4 |
padding: 0 0 10px 16px;
|
5 |
-
/*border: 1px dotted blue;*/
|
6 |
cursor: pointer;
|
7 |
}
|
8 |
.arrowright {
|
9 |
background-position: top right;
|
10 |
padding: 0 16px 10px 0;
|
11 |
}
|
12 |
-
.noarrow {
|
13 |
-
background-image: none !important;
|
14 |
-
padding: 0 0 10px 0;
|
15 |
-
}
|
16 |
.colomat-hover {
|
17 |
text-decoration: underline;
|
18 |
}
|
2 |
background-image: url(images/arrow-down.png);
|
3 |
background-repeat: no-repeat;
|
4 |
padding: 0 0 10px 16px;
|
|
|
5 |
cursor: pointer;
|
6 |
}
|
7 |
.arrowright {
|
8 |
background-position: top right;
|
9 |
padding: 0 16px 10px 0;
|
10 |
}
|
|
|
|
|
|
|
|
|
11 |
.colomat-hover {
|
12 |
text-decoration: underline;
|
13 |
}
|