Rodolfo 👑 Chevereto Godlike Chevereto Staff Administrator Dec 8, 2012 #2 Simply trigger the open/close button. Something like change this: Code: <div id="preferences-box"> <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div> </div> For this: Code: <div id="preferences-box"> <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div><span id="close-pref">Close pref.</span> </div> Will add a node (<span id="close-pref">Close pref.</span>) that will used to trigger the button. You will need to tweak the CSS of that html element to suit your needs. Now, you will need to add this javascript in the theme.js main closure: Code: $("span#close-pref").click(function() { $("a#preferences").click(); }); That function will trigger a click on the preferences switch when you click the close-pref button. Simple as that.
Simply trigger the open/close button. Something like change this: Code: <div id="preferences-box"> <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div> </div> For this: Code: <div id="preferences-box"> <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div><span id="close-pref">Close pref.</span> </div> Will add a node (<span id="close-pref">Close pref.</span>) that will used to trigger the button. You will need to tweak the CSS of that html element to suit your needs. Now, you will need to add this javascript in the theme.js main closure: Code: $("span#close-pref").click(function() { $("a#preferences").click(); }); That function will trigger a click on the preferences switch when you click the close-pref button. Simple as that.