Oliver, This wont remove the head element but only the style and link tags .. but I didnt do the attribute level, I will try it out man.. thanks for the suggestion :)
Cheers JC On Wed, Jan 27, 2010 at 5:48 PM, Oliver Boermans <boerm...@gmail.com> wrote: > On 27 January 2010 17:55, Jayachandran Kandasamy > <jayachandran.kandas...@gmail.com> wrote: > > $(document).ready(function(){ > > $("input.offButt").click(function() { > > if($("head:has(style)") && $("head:has(link)")){ > > $("head:has(style)").remove(); > > $("head:has(link)").remove(); > > } > > }); > > }); > > I’m pretty sure this will remove the head element and everything in it. > Link elements are also used for more than just loading CSS so you > wouldn’t want to remove them without checking the type or rel > attribute too. > > Regarding the JavaScript > http://api.jquery.com/ > http://forum.jquery.com/ > > Cheers > Ollie > > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: memberh...@webstandardsgroup.org > ******************************************************************* > > ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: memberh...@webstandardsgroup.org *******************************************************************