Ran G
Ran G

Reputation: 55

Adding jquery script to css

This is my first time using jquery and know nothing about the syntax, so some guidance is needed please. To edit a label in a page, I was told to add the following script to the css. By looking at it, I think I may need to update the folder structure but not sure:

#ctl01_ridiculously_long_ID li.rtLI > div.rtMid .rtIn > .gleRightLink {
     display: none;
}

I believe this is the original folder structure for our an out-of-the-box site that they may be referring to that and may or may not be helpful for this discussion:

../iCore/Contacts/OrganizationLayouts/CoAdmin/CoAdmin_Tabs/1Contacts.aspx

and my modified page folder structure is:

../Shared_Content/Staff/OrgTabs/1Contacts.aspx

Any guesses on what the script should be changed to and added to my css? Thank you!

Upvotes: 0

Views: 61

Answers (2)

mscdeveloper
mscdeveloper

Reputation: 2889

This is CSS string, add this in your css-file:

#ctl01_ridiculously_long_ID li.rtLI > div.rtMid .rtIn > .gleRightLink {
     display: none;
}

or include in javascript (Jquery):

$('#ctl01_ridiculously_long_ID li.rtLI > div.rtMid .rtIn > .gleRightLink').css({'display': 'none'});

this is not related to the site directories.

Upvotes: 1

Chris Anderson
Chris Anderson

Reputation: 231

You seem to have jQuery mixed up with CSS

<html>
  <head>
     <title>Page Title</title>
     <style> 
     /* CSS declarations */
     .my-label-class {
        display: none;
     }
     </style>
  </head>
  <body>
    <label class="my-label-class"> Label Text </label>
  </body>
</html>

Easy peasy. Nothing to do with folders structure either.

Upvotes: 1

Related Questions