Skip to main content
Topic: Dynamic load pages [JS Snipet] (Read 7241 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Dynamic load pages [JS Snipet]

Reply #15


Here:

My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #16

Indeed that was the button I clicked. And it works all over the place. I am using Chrome (Version 55.0.2883.87 m (64-bit)) in Windows 10.

Re: Dynamic load pages [JS Snipet]

Reply #17

Do you have tried the two steps ?

1 Going a page, for exemple: https://forum.mpdb.tv/index.php/topic,35424.0.html

The button work fine

2 Clic Page 2

The button is broken (for me and others members who have tried).

That not appairs on every Topics.



It's not important for me. I Tried few mods and I make report.
My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #18

Not sure if can help.

My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #19

Ah! Unless you hover it looks like it's just a tab thingy. I'd forgotten all about its existence.

Anyway, seems to work for me. I clicked previous and next page a few times, tried up and down arrow a few times, all working. Same if I try clicking a page number specifically. Maybe the key is that I'm not logged in?

Re: Dynamic load pages [JS Snipet]

Reply #20

That's right !
I tried juste after read your message. Im disconnect, the bug disappear !

My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #21

The animation is lost probably because of how it is attached to the buttons.
Try changing in theme.js this:
Code: [Select]
	$("a[href=#top]").on("click", function(e) {
e.preventDefault();
$("html,body").animate({scrollTop: 0}, 1200);
});

// Smooth scroll to bottom.
$("a[href=#bot]").on("click", function(e) {
e.preventDefault();

to this:
Code: [Select]
	$(document).on('click', "a[href=#top]", function(e) {
e.preventDefault();
$("html,body").animate({scrollTop: 0}, 1200);
});

// Smooth scroll to bottom.
$(document).on('click', "a[href=#bot]", function(e) {
e.preventDefault();
Bugs creator.
Features destroyer.
Template killer.

Re: Dynamic load pages [JS Snipet]

Reply #22

Emanuelle,

In this order:

Code changed, empty cache, empty cache browser, empty my plate nuddle, disconnect, reconnect.

And... IT WORK

Edit, no, Sorry, the problem remain the same.






Last Edit: February 02, 2017, 06:52:53 pm by shaitan
My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #23

And today all work. Strange !  :o
Solved for me.

Many Thanks Emanuelle and all members who give help for this incredible Forum project.
Elkarte is Fantastic !


My Tailor is rich

Re: Dynamic load pages [JS Snipet]

Reply #24

Probably just the browser cache not refreshed. :)
Bugs creator.
Features destroyer.
Template killer.

Re: Dynamic load pages [JS Snipet]

Reply #25

I pack this in a simple package for easy install and uninstall, put Dynamo as its author and name it as Dynamic Page Load (with hope in the future the author will cover all page load :D ) This package involve adding the code to the end of the mentioned file.[1]
I didn't make as a hook package as I've never successfully load this javacript as a file. As instructed by the author, it is to be added inside elk js file, which may be intended to overwrite default js. I really don't know.

Re: Dynamic load pages [JS Snipet]

Reply #26

I think I somehow managed to make it work fully hook. I attached the new package. If this working with you too, in the future update, just insert the new code into Dynamo.js in default theme scripts Dynamo folder.

Re: Dynamic load pages [JS Snipet]

Reply #27

I wish all my elkarte pages to load using this style instead of just in message display page. I am not good in js / jquery etc, so can somebody help me on how to implement this?

Re: Dynamic load pages [JS Snipet]

Reply #28

All the pages may be a little tricky because of several reasons (even only because different pages may require different javascript files to be loaded).
Bugs creator.
Features destroyer.
Template killer.

 

Re: Dynamic load pages [JS Snipet]

Reply #29

I noted that it is tricky.

Should I start looking for each page code and where?

Or can it be done in such a way that all internal url is load with the same loading effect? I mean the code can look for it instead of various ids or classes, right?