0

I am working on a scrolling site for my company and we are using SerialScroll to accomplish the scrolling. Frustratingly I cannot for the life of me find a good way to implement a Back Button and even though the user experience does not require it to function, My boss had a terrible experience with a previous contracted developer who took a year, A YEAR to fix the back button on the last site. So they are unwilling to even listen to me on this issue.

serialScroll uses a constant variable for the postion, my thinking, naive as it may be, would be to find a way to update that position variable from outside the serialScroll function. That way when the back button is clicked, I can update the serialScroll position??? I cannot for the life of me find a solution or if it's even possible? Any help would be greatly greatly appreciated.

Here's my current function:

$(function(){
var next_btn = $('#sec0_nav a.next');
var prev_btn = $('#sec0_nav a.prev').hide();

        $('#wrapper').serialScroll({
            target:'#sec',
            items:'.prod_list', 
            prev: prev_btn,
            next: next_btn, 
            axis:'x',
            navigation:'#prod_nav li a',
            duration:500,
            force:true,
            cylce: false,

            onBefore:function( e, elem, $pane, $items, pos ){

                prev_btn.add(next_btn).show();  
                    if( pos == 0 )prev_btn.hide();
                else if( pos == $items.length -1 )
                    next_btn.hide();

                    $('.prod_list').removeClass('current'); 

        },//end onBefore    


        onAfter:function(elem) {
            var posPlace = (elem).id; 
                location.hash = posPlace; 
                    $(elem).addClass('current');

            }//End onAfter

    });//end serialScroll

 });
Nathan White
  • 65
  • 3
  • 11
  • Are you actually leaving the page, or do you want the `back` button to operate as a way to traverse to some other object within the page that was referenced earlier (by like a hash, or something?) – Ohgodwhy Aug 06 '12 at 20:40
  • I never leave the page. I'am updating the hash as I click through the items. I can use scrollTo when the back button is pressed to walk back through the history but it messes up the position within serialScroll. I.e. if on item 4 and user uses the back button to goto item 1 when the next button is pressed, serialScroll goes to item 5. – Nathan White Aug 06 '12 at 21:34

1 Answers1

0

There actually is one very pathetic way of opening class files in dreamweaver. If you use dreamweaver's search feature, which searches files and you have the extensions.txt set for class files, then dreamweaver will search the class file and return resutls. After that you can now double click the result and it will open the class file in dreamweaver. It is the only place Adobe has forgotten to disable in order to open class files.

mdarin
  • 1
  • woops that was for another stack overflow question. I pasted into the wrong one. I am still working on this one though. – mdarin Aug 07 '12 at 14:53