0

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!

5
  • The line they told you to add is just CSS. jQuery has nothing to do with it. What file did you paste the code in? Normal options would be an existing CSS file, a new one (which you would have to call from your HTML header), or just in a <style> tag in the HTML. Commented Jul 20, 2018 at 20:30
  • This is actually just a CSS question and has nothing to do with JQuery or Javascript. You'll want to look in to how CSS Selectors work and look at your page and find out why it isn't working. Commented Jul 20, 2018 at 20:30
  • jquery is a javascript library - a completely different technology from css. the two should be separated into different files Commented Jul 20, 2018 at 20:31
  • and css has nothing to do with folders. You probably need to research the basics about how css works Commented Jul 20, 2018 at 20:37
  • Thank you everyone. Now that I understand the difference, once I added it to css, it worked. Thank you! Commented Jul 31, 2018 at 14:34

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! Now I see the difference, I appreciate it. that worked
1

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.

1 Comment

Got it, you're right. I thought the directory structure would dictate it, but nope, thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.