Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:58:16+00:00 2026-06-09T23:58:16+00:00

EDIT: this works (gives me an alert): if (document.cookie.indexOf(TR_LNG) >= 0) { alert(‘cookie found’);

  • 0

EDIT:this works (gives me an alert):

if (document.cookie.indexOf("TR_LNG") >= 0) { alert('cookie found'); }

So it’s the hiding mechanism thats the problem.
BUT in console: $('.langselmain').hide('fast'); this works as well so i have no idea wtf is wrong. END EDIT

I’m trying to check for a language preference cookie, and if it exists to hide the language selection dialogue. this is what I’m using to check the cookie:

if (document.cookie.indexOf("TR_LNG") >= 0) { $('.langselmain').hide('fast'); } 

and the content to hide:

<div id="langselectsplash" class="langselectsplash langselmain"><div id="select"><img src="http://sarvatma.org/wp-content/uploads/2012/08/sarvalogo2.png" /><p> 
        <style>#tr_setdeflang{display:none;}</style><div class="no_translate transposh_flags" ><a id="en" href="/about/" class="tr_active">English</a><a id="fr" href="/fr/about/">Français</a><a id="de" href="/de/about/">Deutsch</a><a id="ja" href="/ja/about/">日本語</a><a id="pl" href="/pl/about/">Polski</a><a id="es" href="/es/about/">Español</a></div>        </p></div></div><div id="langsplashfade" class="langselmain"></div> 

and its just not working

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:58:18+00:00Added an answer on June 9, 2026 at 11:58 pm

    You can use: https://github.com/carhartl/jquery-cookie

    js to set the cookie:

    $.cookie('TR_LNG', 'set the value');
    

    js to hide:

    if ($.cookie('TR_LNG')) {
        $('.langselmain').hide();
    }
    

    Working jsfiddle:

    http://jsfiddle.net/3ypED/1/

    Edit: no plugin http://jsfiddle.net/3ypED/4/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: This code now works correctly, I only left it in case someone finds
This works: Entities.WorkOrderSet.Where(MyCustomMethod); This does not: Entities.WorkOrderSet.Where(o => MyCustomMethod(o)); ( [Edit] Even without new
EDIT: I realized that this code compiles and works: #include <iostream> template<class Something> class
EDIT: It works but it takes amazingly long to complete. Is this normal, or
EDIT: My main code no longer works, should this function work? <script type=text/javascript src=jquery-1.7.2.js></script>
EDIT/ANSWER: this works fine in mongoose >= 3.0 also I have a mongoose schema
Terrible title, I know... This works and gives me what I'm looking for, but
EDIT: This privately published page is what I need to work with. Password: stackOF
EDIT: It does work (sorry). Something in this script is causing it to stop
Edit: This problem was down to me passing the wrong view to the Touch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.