Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    86
    Thanks
    20
    Thanked 0 Times in 0 Posts

    Hide|Remove 'class' via javascript

    No Jquery plz

    As you can see that I want to remove this advertisement area (denoted by 1) via some java code. Now one can observe that this advert is hosted in the 'main-content' id & wrapped in 'inner' class. One cannot remove/hide id but CAN remove/hide the class which also will remove/hide the advert area placed within this class.



  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,778
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    Uhm – just to clarify: Can you assert that you are legally allowed to remove the advertisement?

  • #3
    New Coder
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    86
    Thanks
    20
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    Uhm – just to clarify: Can you assert that you are legally allowed to remove the advertisement?
    I needed screenshots to make my question most understandable; if you so are alarmed just put it this way that I want to remove/hide a class in general...via javascript

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,146
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    Quote Originally Posted by defencedog View Post
    I needed screenshots to make my question most understandable; if you so are alarmed just put it this way that I want to remove/hide a class in general...via javascript
    Sounds like a potential violation of the TOS.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    New Coder
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    86
    Thanks
    20
    Thanked 0 Times in 0 Posts
    Now I shouldn't have posted those images; then you should have helped....

    here my progress & it works...but if there is another approach do let me know, I just am a student

    Code:
    $(document).ready(function() {
          $('div.classname').hide();
    });

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,778
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    Didn’t you say “no jQuery please”?

  • #7
    New Coder
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    86
    Thanks
    20
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    Didn’t you say “no jQuery please”?
    I said that essentially because I can't do JavaScript myself & required javascript code from brainers here...
    .but if there is another approach do let me know
    but they transgress whether my question is legal or not
    Last edited by defencedog; 10-06-2011 at 09:34 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •