Changeset - 8ca60f8b076f
[Not reviewed]
0 1 0
Brett Smith (brett) - 3 years ago 2020-11-25 16:43:57
brett@sfconservancy.org
js: Bugfix handling the "no window.location.hash" case.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -108,13 +108,13 @@ $(document).ready(function() {
 
    };
 
    $window.bind("hashchange", selectSupportTypeFromHash);
 
    if (selectSupportTypeFromHash().length === 0) {
 
        supportTypeSelector("#annual").click();
 
    }
 

	
 
    var want_id = window.location.hash.substr(1);
 
    var want_id = window.location.hash.substr(1) || "do not match any id";
 
    $('a.read-more').each(function(index, readmore) {
 
        var $readmore = $(readmore)
 
        var $content = $(readmore.hash);
 
        var $header = $content.prev('h3');
 
        if (($header.length && $header[0].id === want_id) || readmore.id === want_id) {
 
            $readmore.hide();
0 comments (0 inline, 0 general)