Collapse-O-Matic - Version 1.4.7

Version Description

Fixed auto-expand of urls with id-anchors

Download this release

Release Info

Developer baden03
Plugin Icon 128x128 Collapse-O-Matic
Version 1.4.7
Comparing to
See all releases

Code changes from version 1.4.6 to 1.4.7

Files changed (4) hide show
  1. collapse-o-matic.php +1 -1
  2. collapse.js +4 -4
  3. collapse.min.js +1 -1
  4. readme.txt +7 -1
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.6
7
  Author: twinpictures, baden03
8
  Author URI: http://twinpictures.de/
9
  License: GPL2
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
7
  Author: twinpictures, baden03
8
  Author URI: http://twinpictures.de/
9
  License: GPL2
collapse.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * jQuery Collapse-O-Matic v1.3.7
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2012, Twinpictures
@@ -212,9 +212,9 @@ jQuery(document).ready(function() {
212
  var myFile = document.location.toString();
213
  if (myFile.match('#')) { // the URL contains an anchor
214
  // click the navigation item corresponding to the anchor
215
- var myAnchor = '#' + myFile.split('#');
216
- if(myAnchor.length > 1 && myAnchor[1] != '#'){
217
- jQuery(myAnchor).click();
218
  }
219
  }
220
 
1
  /*!
2
+ * jQuery Collapse-O-Matic v1.4.7
3
  * http://plugins.twinpictures.de/plugins/collapse-o-matic/
4
  *
5
  * Copyright 2012, Twinpictures
212
  var myFile = document.location.toString();
213
  if (myFile.match('#')) { // the URL contains an anchor
214
  // click the navigation item corresponding to the anchor
215
+ var anchor_arr = myFile.split('#');
216
+ if(anchor_arr.length > 1 && anchor_arr[1] != '#'){
217
+ jQuery('#' + anchor_arr[1]).click();
218
  }
219
  }
220
 
collapse.min.js CHANGED
@@ -1 +1 @@
1
- var duration='fast';jQuery(document).ready(function(){var slideEffect='slideFade';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(this).addClass('colomat-visited');if(slideEffect=='slideToggle'){jQuery('#target-'+id).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+id).animate({height:"toggle",opacity:"toggle"},duration)}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+id).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+id).animate({height:"toggle",opacity:"toggle"},duration)}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}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('#');if(myAnchor.length>1&&myAnchor[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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}});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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}});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)})});
1
+ var duration='fast';jQuery(document).ready(function(){var slideEffect='slideFade';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(this).addClass('colomat-visited');if(slideEffect=='slideToggle'){jQuery('#target-'+id).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+id).animate({height:"toggle",opacity:"toggle"},duration)}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+id).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+id).animate({height:"toggle",opacity:"toggle"},duration)}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}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 anchor_arr=myFile.split('#');if(anchor_arr.length>1&&anchor_arr[1]!='#'){jQuery('#'+anchor_arr[1]).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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}});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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}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)}if(slideEffect=='slideToggle'){jQuery('#target-'+thisid).slideToggle(durration,function(){})}else if(slideEffect=='slideFade'){jQuery('#target-'+thisid).animate({height:"toggle",opacity:"toggle"},duration)}})}});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)})});
readme.txt CHANGED
@@ -5,7 +5,7 @@ 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.1
8
- Stable tag: 1.4.6
9
 
10
  Remove clutter, save space: display and hide additional content in a SEO friendly way by wrapping content in an [expand] shortcode.
11
 
@@ -44,6 +44,9 @@ No. Not even close.
44
 
45
  == Changelog ==
46
 
 
 
 
47
  = 1.4.6 =
48
  * fixed JS error in 1.4.5 - GRRR
49
 
@@ -154,6 +157,9 @@ No. Not even close.
154
 
155
  == Upgrade Notice ==
156
 
 
 
 
157
  = 1.4.6 =
158
  * Fixed JS bug in 1.4.5 - Sorry people.
159
 
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.1
8
+ Stable tag: 1.4.7
9
 
10
  Remove clutter, save space: display and hide additional content in a SEO friendly way by wrapping content in an [expand] shortcode.
11
 
44
 
45
  == Changelog ==
46
 
47
+ = 1.4.7 =
48
+ Fixed auto-expand of urls with id-anchors
49
+
50
  = 1.4.6 =
51
  * fixed JS error in 1.4.5 - GRRR
52
 
157
 
158
  == Upgrade Notice ==
159
 
160
+ = 1.4.7 =
161
+ * Fixed auto-expand of urls with id-anchors
162
+
163
  = 1.4.6 =
164
  * Fixed JS bug in 1.4.5 - Sorry people.
165