Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove autofocus #17

Open
niravpatel9898 opened this issue Dec 8, 2017 · 0 comments
Open

How to remove autofocus #17

niravpatel9898 opened this issue Dec 8, 2017 · 0 comments

Comments

@niravpatel9898
Copy link

Checklist

  • I'm using version [0.3.4]
  • My browser is: Chrome, Firefox and other's I havent seen

Description

I have form on my page which has multiple text input fields. I wanted to add a range slider too. I added it via the code below. The issue is that whenever I open the page it is autofocusing on the slider which should not be the case. I checked the documentation to see whether there is any option to alter autofocus or not, but didn't find any. Could any one please help.

This is how I used it in my code:

var rangeSlider = function(){
var slider = $(document).find('.my-range-slider');
slider.each(function(){
    var value = $(this).attr('value');
    $(this).asRange({
        step: $(this).attr('step'),
        range: false,
        min: parseInt($(this).attr('min')),
        max: parseInt($(this).attr('max'))
    });
    $(this).asRange('val', value);
});
};
rangeSlider();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant