Is it possible to remember scrollbar position after form submit and returning back to the home page?
Here is my form:
<form method="post" action="{{Route('sites.liking')}}">
<input name="_token" value="{{csrf_token()}}" type="hidden">
<input type="hidden" value="{{$meme->likes}}" name="likes">
<input type="hidden" value="{{$meme->id}}" name="likeid">
<input type="hidden" value="{{Auth::user()->name}}" name="sendeduser">
<button class="linking">+ {{$meme->likes}}</button>
</form>
Routing:
Route::post('/', ['uses' => 'LikingComments@liking', 'as' => 'sites.liking']);
Controller function:
public function liking(Request $request) {
//Function guts
return redirect('/')->with('status', $id);
}
I've tried several scripts but it always scrolls to the top of the page.
Is there a some way to go back to the same place of the page ?