Bitcoin Forum
May 29, 2024, 01:12:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Developers - I need a Javascript bug fixed - $10 bounty  (Read 519 times)
Seal (OP)
Donator
Hero Member
*
Offline Offline

Activity: 848
Merit: 1078


View Profile WWW
January 07, 2016, 08:33:51 PM
Last edit: January 09, 2016, 10:40:06 AM by Seal
 #1

Hi Bitcointalk,

I know a bunch of you on here are very talented developers. I have a small bug that needs fixing for those that are familiar with Javascript. This should be fairly straightforward if you know front-end web dev.

Here's how to replicate the bug.

*edit*


Offer over.

Thanks for looking everyone!

DefiDive - Filter the noise
A clean crypto asset management terminal
MoonOfLife
Sr. Member
****
Offline Offline

Activity: 714
Merit: 253


View Profile
January 07, 2016, 09:43:50 PM
 #2

on firefox also like that too
micaman
Sr. Member
****
Offline Offline

Activity: 345
Merit: 500



View Profile WWW
January 07, 2016, 10:35:04 PM
 #3

I think I won't help much, but it looks like your problem shows up as soon as you leave your homepage, it's just not noticeable because your images don't cycle in the other pages. If you set a breakpoint on the last instruction of your setInterval, you will notice it cycles every 5s, as expected. But when you change page, it seems it gets triggered after 2 or 3s, like if it had 2 instances running simultaneously.
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1890
Merit: 1310

Get your game girl


View Profile
January 07, 2016, 10:58:08 PM
Last edit: January 07, 2016, 11:51:06 PM by Joel_Jantsen
 #4

Yes I can fix this error. There are multiple ways of doing it. Setting the delay for the carousel on the landing page would work too. There could be a minor bug in the code as well. Can we have access to the code to see what exactly is happening? I think I can fix this.

Code:
$('#mainCarousel').carousel({
    interval: 4000
});

//Interval is the delay at which the slides change.

If you're using css to animate then this could work
Code:
.carousel-inner > .item {
    position: relative;
    display: none;
    -webkit-transition: 0.5s ease-in-out left;
    -moz-transition: 0.5s ease-in-out left;
    -o-transition: 0.5s ease-in-out left;
    transition: 0.5s ease-in-out left;
}

Furthermore ,there could be a slight possibility you need to update the versions of Jquery and Angular stuff (Angular.animate/angular.route etc) because your're using the old versions.Try updating them,might help.
Gramas
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile
January 07, 2016, 11:10:20 PM
 #5

Try to add these headers to the page:

<?php
header("Cache-Control: no-store, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
?>

I believe the problem you are having is because of content cache by the browser.

This will force all browsers not to cache the page and so even when back button is clicked, all should be reloaded as if it is the first request.

Btw, your issue doesn't happen only on the back button, if you click on some other page and then you click on the logo, you will have the same issue.
ani4444
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
January 08, 2016, 10:41:07 AM
 #6

Javascript Quickfix


Code:
<script type="text/javascript">
       $(document).ready(function()
        {
                var d = 5;
                if ($('#reloadValue').val().length == 0)
                {
                        $('#reloadValue').val(d);
                }
                else
                {
                        $('#reloadValue').val('');
                        location.reload();
                }
        });

</script>

To be added in body somewhere:

Code:
<input id="reloadValue" type="hidden" name="reloadValue" value="" />

1Aswr8vXivfate2vbKKtZHtLisFAVFfqqe
Seal (OP)
Donator
Hero Member
*
Offline Offline

Activity: 848
Merit: 1078


View Profile WWW
January 08, 2016, 11:16:37 AM
 #7

Thanks for the responses so far. The problem seems to be well understood. The solution I'm after is ideally a fix to the root cause. I'm sure one or two of the suggestions may work but they seem to be workarounds.

DefiDive - Filter the noise
A clean crypto asset management terminal
Joel_Jantsen
Legendary
*
Offline Offline

Activity: 1890
Merit: 1310

Get your game girl


View Profile
January 08, 2016, 11:25:19 AM
 #8

Thanks for the responses so far. The problem seems to be well understood. The solution I'm after is ideally a fix to the root cause. I'm sure one or two of the suggestions may work but they seem to be workarounds.
Have you tried updating the dependencies? Give that a shot .
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!