Using Cookies to make action stay on browser refresh or closed/Re-open

Hello everyone!
I have this peice of JQuery:
<script type="text/javascript">
$(document).ready(function() {
$('#tab1').on('click',function(){
    $('ol li span').removeClass(function() {
          return $(this).attr('class');
        }).addClass('default');
$('#tab2').click(function(){
    $('ol li span').removeClass(function() {
          return $(this).attr('class');
        }).addClass('style2');
$('#tab3').click(function(){
    $('ol li span').removeClass(function() {
          return $(this).attr('class');
        }).addClass('style3');
</script>
Html:
<a id="tab1" href="#">Sample</a>
<a id="tab2" href="#">Sample</a>
<a id="tab3" href="#">Sample</a>
As you can see I simply need to apply a particular style to list in a span when a tab with the specific ID is clicked, the issue is Cookies which I do not eat often.
How do I make this stay? If the user selects/clicks  a particular tab I would rather the style remain on refresh or browser close and if nothing is selected when the page is first visited than the default applies.
By the way I am using ID on the link (anchor) because it is doing something unrelated to this post.
I can find my way around applying a single style (default) but in this case there are different styles for each tab clicked.
This I do not know.
Thanks for reading my sob story.
DR

This is likely caused by one of the installed extensions and quick_start in the chrome URL should tell which extension in this case.
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
*Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
*Do NOT click the Reset button on the Safe Mode start window
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
There are other things that need your attention.
Please update to the current Firefox 31 release.
*Help > About Firefox
*https://support.mozilla.org/kb/update-firefox-latest-version.
*https://support.mozilla.org/kb/Updating+Firefox
The Firefox 14 version that you currently run is no longer supported with security updates.
*It is important to update Firefox and add-ons to the latest version to get all security fixes.

Similar Messages

  • Let addon run even after browser window is closed.

    I want to use this addon - "Pushbullet" even after the browser window is closed. Such an option was available in Chrome when I used it last. I migrated to Firefox recently, and would like to know how to implement the same here.
    Thanks,
    Raj

    FredMcD, You have been here long enough to know there is a "Edit This Post" link on right of your posts as three posts in a row in short order is too much.
    Some Extensions if you can find the chrome url can be used in shortcut to start a Firefox process but only with the Extension running.
    The ChatZilla irc client extension for instance can or at least used to.

  • Enable your Internet browser to accept cookies and make sure that javascript is enabled problem

    I am have problems logging onto adcenter.microsoft.com
    As soon as I try to submit my user/pass I get the msg:
    "Please enable your Internet browser to accept cookies and make sure that javascript is enabled. If you aren’t sure how to do this, refer to your browser’s Help"
    I have done various tests to see if my browers does accept cookies and javascript is enabled, and all is good here.
    I also have the plugin Java plugin 2 for npapi 13.6.0. (I am running firefox on mac).
    I used to be able to log into the site. not anymore. Since then i must have updated firefox a few times.
    I have cleared cache/cookies. I have disabled all plugins/extensions. Still can't get in.
    What else can i do?
    I have spoken with microsoft adcenter, and all they could tell me was make sure i have the latest java, which i have i guess.

    To avoid confusion:
    *http://kb.mozillazine.org/JavaScript_is_not_Java
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    See:
    * [http://adcenterhelp.microsoft.com/help.aspx?project=adcenter_live_std&market=en-us&querytype=keyword&query=730yek&tmt=&domain=adcenter.microsoft.com&format=b1 Microsoft Advertising Help]
    Notes
    ** If you use Mozilla Firefox, you must enable cookies and JavaScript. Check the Help for Mozilla Firefox for info on how to do this.
    ** Currently, adCenter doesn't support Apple Safari or Google Chrome.
    ** Also, adCenter currently doesn't run on Apple Mac OS, Virtual PC, or mobile phone platforms.

  • I have received this error message when trying to send a comment to a blog : ERROR: Could not read CAPTCHA cookie. Make sure you have cookies enabled and not blocking in your web browser settings. Or another plugin is conflicting. See plugin FAQ., can any

    I have received this error message when trying to send a comment to a blog : ERROR: Could not read CAPTCHA cookie. Make sure you have cookies enabled and not blocking in your web browser settings. Or another plugin is conflicting. See plugin FAQ., can any...
    Only found one question similar and NO ANSWER to it.

    Same problem here...nothing in my settings have changed since the upgrade and I've checked my cookie settings and they allow 3rd party cookies. What's up Mozilla? I've been faithful to you for years and you let me down now?

  • Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    Can't access my gmail using the gmail app. States your browser's cookie functionality is turned off. please turn on. How do i do that???

    what if I don't want to accept cookies? I didn't have to before I upgraded

  • Cooking with iPad how to make screen stay on longer

    Cooking with iPad how to make screen stay on longer

    Try, settings - General - Auto Lock. Set to your preferred time.
    Stedman

  • How do I make Safari stay with one window as I browse?

    I don't use tabs at all. When I browse on Safari, starting on my homepage, every time I click a link, a new window pops open. After a few minutes, I end up with a ton of windows open - as I X out, I end up having to X out way more pages than I used to. This seems to be a recent development. I prefer to just use one window and click the back arrow, unless I specifically drag down the "New Window" from the File drop-down. I'm on Safari 6.1.4 and using 10.8.5 on my Air.

    x out way more pages?
    The x only appears on tabs which you mentioned you don't use.
    Not sure what you mean.

  • Firefox 4.0.1 will not stay default browser, have to restate at everytime I open in

    Every time I open Firefox 4.0.1 it asks would you like FF to be your default browser. How do i make this stay default?

    Hi Tylerdowner -
    Thanks for your suggestion.
    I already tried a Reset, but all that did was lose all my settings , search engines etc. and one or two add-ons - as expected.
    I also already tried updating my graphics driver - both manually, and with Windows Update (Automatic Updates is set to ON anyway, and I've checked the optional ones as well, and though there was nothing relevant there, I installed most of them anyway!) Apparently I'm using the most up-to-date and appropriate driver already!
    Oh dear........
    Going to try turning off hardware acceleration next....

  • Using cookie with DII

    Here is an example to use cookie with static web service call:
    http://download.oracle.com/docs/cd/B32110_01/web.1013/b28974/j2sewsclient.htm#DAFDHCFA
    could some one give an example using cookie with dynamic invocation interdace to inva=oke web service?
    Thanks

    Dear net pas,
    Hope you are doing good.
    You have raised a very valid issue.
    Please do have a look at the SAP NOTE: 1144722-Global configuration of session cookies and attributes
    Also:
    Protecting Sessions Security
    http://help.sap.com/saphelp_nw70/helpdata/en/44/691ccdce2a3675e10000000a114a6b/frameset.htm
    Here pay special attention at:
    cookies named JSESSIONID (in accordance with the JavaÔ Servlet 2.3 specification) for tracking Web browser sessions.
    For this purpose, make sure that the value of SystemCookiesDataProtection and SystemCookieHTTPProtection properties of the HTTP Provider Service on the server nodes is set to true:
    More info at:
    http://help.sap.com/saphelp_nw70ehp2/Helpdata/EN/44/691ccdce2a3675e10000000a114a6b/content.htm
    Thank you and have a nice day :).
    Kind Regards,
    Hemanth
    SAP AGS

  • How can I make Firefox my default browser on my Galaxy Tab?

    I wamt to make Firefox my default browser on my Galaxy Tab (Android). How can I do this?

    When you click the internet (globe) icon you may be able to choose check the 'Use by default for this action' check box then select Firefox.
    If not then you will need to open the Settings > Applications > the click on the default browser and press the clear defaults button. Then follow the above directions.

  • How do I use cookies to control which part of the timeline to play from?

    Hi there,
    I have created an animation with Adobe Edge. My site uses Concrete5 and I am pulling in the Edge content into an IFRAME on my home page (there my be a better way to do this and I'm open to suggestions). I want the animation to play from the start when someone first visits the site, but if during their browser session they navigate back to the home page, I want the animation to only play a shorter segment of frames near the end.
    My question is, how do I use cookies to acheive this? I'm new to javascript/jquery.
    I've included the following code on compositionReady, (found in another post on this forum) but don't have a clue how to continue...
    // insert code to be run when the composition is fully loaded here yepnope(   {     nope:[       '/js/jquery.cookie.js'     ],   complete: init   } ); function init() { //create your cookie's initial values here } 
    My temp site is here - http://79.170.40.43/nutcrackerdesign.co.uk/
    On revisting the homepage, I only want to play from when the green 'How can we help?' button drops in.
    Many thanks!
    Russ

    Hi, Russ-
    I found this article, which seemed really helpful in describing how cookies work in JavaScript:
    http://www.quirksmode.org/js/cookies.html
    Remember that JS works just fine within Animate, so on your compositionReady, you can read your cookie and then set the play based on that.  You should probably uncheck the autoplay for your Stage and control the play of your Stage from the compositionReady.
    Good luck!
    -Elaine

  • When using tabbed browsing, if I click to open a new tab, why will it not automatically load my homepage in the new tab instead of a blank window?

    I use tabbed browsing with the tab bar visible at all times so I can click on a new tab when convenient.Why can my homepage not load automatically on that newly opened tab insted of a blank screen with a search bar saying "you've opened a new tab".........well yeah. I have looked through the options and cannot find anything to open a new tab with the homepage. Is it possible? Have I missed it? If it's not possible, could you make it so?
    == This happened ==
    Every time Firefox opened
    == I opened a new tab.....see above

    The default is to load a blank page.
    Try one of these add-ons:
    http://sogame.awardspace.com/newtaburl/
    https://addons.mozilla.org/en-US/firefox/addon/777

  • HT200131 When I connect my MacBook Air to my TV using Apple TV, the audio stays on my MacBook and does not transfer to my TV. Thus the volume is very low when I am watching a Movie on my TV and I have to listen to the volume from my laptop. How can I fix

    When I connect my MacBook to my television using Apple TV the audio stays on the MacBook and doesn't transfer to the TV. How can I make it so I can hear the Movie or Video through my TV's speakers and not my MacBook's?

    This is called "extended desktop mode".  It's an extension of the desktop off to the right (by default) of your MBair screen.  Grab an app and drag it off the right side of your MBair screen and it will appear on the TV.
    To mirror your MBair screen on the TV you can press Command F1.  This will toogle between mirror and extended desktop.
    You can find all the settings in System Preferences > Displays > Arrangement tab.
    Regards,
    Captfred

  • After I make a note in the notes icon that came with the ipad, it immediately is emailed to my email address and disappears from notes. How can I make it stay on notes?

    After I write a note in the notes icon that came with the ipad, it immediately emails it to my email account and erases it from the note pad. How do I make it stay on the notepad? I don't particularly want it emailed to me.

    I have a test with some questions (multiple choice, FIB, matching, etc). I have just one button to submit all the answers, and after submiting the student can see his score and review the test to know where he failed. He can't answer again. However, he can change the answer multiple times before submiting.
    "if i turn on success/failure captions the student will see them while answering" - before submitting
    "if i turn them off he wont know what's the right answer" - after submitting
    My results page is the default. I didn't use any variable. When i go to the results page after reviewing the test all the entry boxes are "wrong".

  • How to make folders stay collapsed in list view in finder?

    could someone please tell me if there is a way to make folders stay collapsed next time you open that particular folder (like they used to in tiger)
    let me explain this in more detail
    back in tiger, when you were in list mode, when you press right arrow on a folder it was expanding its contents, but the next time you open that folder those folders were collapsed, whereas in leopard it remembers the folders you expanded and they stay expanded forever (or until you collapse them all again manually)
    i think its a lot more logical for them to stay collapsed next time you're opening that folder because if you have a lot of subfolders and they're all expanded when you open the folder next time its huge, the side scroller bar is tiny and its very difficult to find your stuff
    if someone has a solution for this it would be greatly appreciated
    thank you very much

    thanks for your reply
    actually CMD+A & CMD+left arrow only collapses the folders of the folder youre in, and not all the levels of subfolders that youve opened
    if i could do CMD+A & CMD+left arrow to collapse all the levels of expanded subfolders that would be fine but imagine how much time it would take to locate everything that youve expanded and collapse it manually if you have about 10 levels of subfolders?
    i find this incredibly frustrating, has anyone else got any suggestions?

Maybe you are looking for

  • How do I check if there is an error message?

    WIth <h:message for="something"/> I can display the (error) message for "something". How do I check if there is a error message fomr "something" in a JSF page? I am asking cause I want to use an other styleClass for an h:inputText field. Can there be

  • HP Color Laserjet CP1215 on XP home network will not print from second computer.

    Win XP SP3 home network with two computers and one HP Color Laserjet CP1215 printer(USB) that is shared.   Computer one prints just fine, but second computer cannot print. Print job goes to the queue and says "printing" and stays there for about two

  • Ipod Touch Sleep/Wake button not working

    Okay people I've had my 1st generation iPod touch since April of 2008...all of a sudden ( a few months ago) my sleep/wake button just stops working. Then recently it began to work again like for 4 days and then it just S T O P P E D ....A G A I N!!!

  • Open new tab by right click

    in old firefox (3.6) when clicking the right click on a link , the " open link in new tab" was the second option. but now in the new firefox (4.0) it is the first option. is there is a way to make it the second option because this annoying me a lot .

  • Query on time field.

    Hi, I have a column "Date1" in a table. On the form I define it as Datetime datatye. I have the format mask of 'HH24:MI' on that column. Iam not able to query on that field. Tried adding the foll. code ' AND TO_CHAR(MY_TABLE.MY_TIME, ''HH24:MI'') = T