Adding common elements like menu or footer dynamicaly

26 replies · opened Apr 12, 2017

WWebink74Apr 12, 2017

Hello,

I need to load a menu.html and a footer.html files in the #primary-menu div and the #footer div of each page in order to update it only once each time it needs to be updated.
So I have tried to place it : $("#primary-menu").load("menu.html"); in different place initializing it in the functions.js file but it seems to load after the superfish plugin so some classes are not added (even if I place it at the bottom of the page after the jquery.js).

Could you let me know where to place it well and if it's the good way to achieve it?

SSemicolon WebSTAFFApr 15, 2017

Hello,

This could possibly work but we do not recommend it since this increases the Memory Size on the Page which is why PHP is the best solution for this as everything still works normally and in the default order! However, since you are planning to use this, you will need to check the js/functions.js File for the Functions handling the Menu such as the SEMICOLON.header.superfish(); and reload it in the jQuery Callback which will make the Superfish Menu work on the Externally Loaded Menu.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

WWebink74Nov 28, 2017

Hello,

Thank you for finding the bug while posting on the support forum, I really appreciate that you finally took my messages into account and realize that there really was an issue with it.

I have a request with the SuperFish plugin on a new project, it used to work, but now that I have added one level on my menu tabs, it doesn't show up the dropdown tabs and it doesn't even display the down arrows.
The sub ul's are well loaded in the DOM so I think that my jQuery callback doesn't work properly.
Could you show me a working example that instantiate the menu with the .load() function and works like if it was hard coded in the main html.

Thank you

SSemicolon WebSTAFFNov 29, 2017

Hello,

Can you please provide us with a Live URL so that we can check out the exact issue with the jQuery which is causing the Menus to not load properly and then provide you with more assistance on this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Nov 29, 2017

I don't have a live url to show because I am working on a local host.
But you can very easily reproduce it copying the code inside in a _loaded-header.html_ file. Adding a class .menu-container to. Then adding this line in function.js : $(".menu-container").load("loaded-header.html");

You will see that the dropdown menu doesn't show on hover and the search field is not instantiated.

SSemicolon WebSTAFFNov 30, 2017

Hello,

The Code will look similar to this:

$( "#result" ).load( "ajax/test.html", function() {
	SEMICOLON.header.superfish();
});

This should definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

WWebink74Dec 5, 2017

30 November 2017 ???!!! Are you kidding me ?!! You didn't answer this post before today, I came back here to see it everyday since the 29th !!

You marked it as Resolved but I will do it when it will be working. For now the menu doesn't load correctly and the dropdown menu is still not instantiated. Could you be more descriptive and at least try to code the way I showed you. I did as you advised and it gives an error linked with this line if( $header.length > 0 ) { headerWrapOffset = $headerWrap.offset().top; }
It seems that the Ajax load is not executed before this line :SEMICOLON.documentOnReady.windowscroll();

Replying very quickly would be appreciated!

SSemicolon WebSTAFFDec 6, 2017

Hello,

Thanks for your Patience! [sb_private_reply]Your Support Query was answered according to the dates mentioned. This might have been a cache issue. We will definitely look into what went wrong with this.[/sb_private_reply]

Without a Live URL it is really hard to understand the core issue. Additionally, we hope you understand that this is a Customization Request and a feature which is not included by default into Canvas. The real issue here is the JS Initialization which causes all the messup. The js/function.js File is designed in a way so that it minimizes the risk of the js garbage bubbling up in the Memory which caused a website to lag. The jQuery Objects are initialized only once on Page Load and reused when necessary. But the way you are adding the Header and Footer on the Page using JS, the default js/functions.js File do not find the Elements on the Page. This is the code which initializes the objects present on a Page:

var $window = $(window),
	$body = $('body'),
	$wrapper = $('#wrapper'),
	$header = $('#header'),
	$headerWrap = $('#header-wrap'),
	$content = $('#content'),
	$footer = $('#footer'),
	windowWidth = $window.width(),
	oldHeaderClasses = $header.attr('class'),
	oldHeaderWrapClasses = $headerWrap.attr('class'),
	stickyMenuClasses = $header.attr('data-sticky-class'),
	responsiveMenuClasses = $header.attr('data-responsive-class'),
	defaultLogo = $('#logo').find('.standard-logo'),
	defaultLogoWidth = defaultLogo.find('img').outerWidth(),
	retinaLogo = $('#logo').find('.retina-logo'),
	defaultLogoImg = defaultLogo.find('img').attr('src'),
	retinaLogoImg = retinaLogo.find('img').attr('src'),
	defaultDarkLogo = defaultLogo.attr('data-dark-logo'),
	retinaDarkLogo = retinaLogo.attr('data-dark-logo'),
	defaultStickyLogo = defaultLogo.attr('data-sticky-logo'),
	retinaStickyLogo = retinaLogo.attr('data-sticky-logo'),
	defaultMobileLogo = defaultLogo.attr('data-mobile-logo'),
	retinaMobileLogo = retinaLogo.attr('data-mobile-logo'),
	$pagemenu = $('#page-menu'),
	$onePageMenuEl = $('.one-page-menu'),
	onePageGlobalOffset = 0,
	$portfolio = $('.portfolio'),
	$shop = $('.shop'),
	$gridContainer = $('.grid-container'),
	$slider = $('#slider'),
	$sliderParallaxEl = $('.slider-parallax'),
	swiperSlider = '',
	$pageTitle = $('#page-title'),
	$portfolioItems = $('.portfolio-ajax').find('.portfolio-item'),
	$portfolioDetails = $('#portfolio-ajax-wrap'),
	$portfolioDetailsContainer = $('#portfolio-ajax-container'),
	$portfolioAjaxLoader = $('#portfolio-ajax-loader'),
	$portfolioFilter = $('.portfolio-filter,.custom-filter'),
	prevPostPortId = '',
	$topSearch = $('#top-search'),
	$topCart = $('#top-cart'),
	$verticalMiddleEl = $('.vertical-middle'),
	$topSocialEl = $('#top-social').find('li'),
	$siStickyEl = $('.si-sticky'),
	$dotsMenuEl = $('.dots-menu'),
	$goToTopEl = $('#gotoTop'),
	$fullScreenEl = $('.full-screen'),
	$commonHeightEl = $('.common-height'),
	$testimonialsGridEl = $('.testimonials-grid'),
	$pageSectionEl = $('.page-section'),
	$owlCarouselEl = $('.owl-carousel'),
	$parallaxEl = $('.parallax'),
	$parallaxPageTitleEl = $('.page-title-parallax'),
	$parallaxPortfolioEl = $('.portfolio-parallax').find('.portfolio-image'),
	$textRotaterEl = $('.text-rotater'),
	$cookieNotification = $('#cookie-notification');

So if the Header does not exist on your Page, then the all the above JS(related to Header) will not initialize throwing an Error which is why you will need to include all the Header, Primary menu, Top Search, Top Cart or any JS related to the Headers from the js/functions.js in your load() Function.

It is highly recommended to use PHP to include all the Dynamic HTML since this will cause no issues with any Elements at all!

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

WWebink74Dec 6, 2017

Did you really edit my own comment above? You know, the comment saying that you predate your late replies, making the impression that you are super fast to reply !! Are you kidding me ? You didn't answer before today and I know it because I came back here everyday since I posted, the 28th.

You don't even gave a valuable answer to the issue, in fact, you just say that your code is not re-usable. Come on, it's been 2 weeks since I renewed my support and today you still don't have a better advise than "you have to pay to use our theme correctly" ?
I first wait 1 week before you considered the bug connecting to this forum and now I am still waiting for you to answer spending my time just to hear from you "give a live URL", to erase my comment and tell me that I can't use your theme as it is designed by jQuery !!??!?

So give me the right way to initialize the good stuff in the callback function and make your menu working from external html file, the way same PHP would do it.
You are reaching the edge of my patience.

WWebink74Dec 6, 2017

Just to make sure there is no bug posting the message above, I also post it as an attachement in this one.

SSemicolon WebSTAFFDec 6, 2017

Hello,

Did you really edit my own comment above? You know, the comment saying that you predate your late replies, making the impression that you are super fast to reply !! Are you kidding me ? You didn’t answer before today and I know it because I came back here everyday since I posted, the 28th.

  1. We have been providing support for a long time now and if we are late, we are late. There is no excuse and there is no reason for us to predate our replies. We have checked out the Server and Forum Logs and the issue appears to be with the Revision Updates, we made an update to the bbpress database and optimized it on 5th December to clear any inconsistencies which might have caused the replies to not display. So we suspect that after repairing the Database, your reply might have displayed late than the original posted date. We will make sure that this does not happen again.

You don’t even gave a valuable answer to the issue, in fact, you just say that your code is not re-usable. Come on, it’s been 2 weeks since I renewed my support and today you still don’t have a better advise than “you have to pay to use our theme correctly” ?

  1. We are just providing you with an explanation of what is the issue with the codes you are trying to use and its future impacts. We are here to make your Websites function better and we will never provide you with inaccurate or unnecessary advice. The codes you are using are really dangerously inconsistent and will always cause issues in the future and PHP include is always better because it negates any extra Code Modifications (which is why we are using PHP in our Live Previews). JS and PHP is not same, so it is not possible to provide with the same solution for JS. Please consider contacting anyone regarding this and getting a second opinion if you want. We assure you that it is way more complicated and Browser resources hungry to make this work by JS than you think.

We are always here to provide you with Support with any issues you face with the features included within the Template: https://help.market.envato.com/hc/en-us/articles/208191263 and more than happy to provide you with minimal customizations which we have always done in the past. But unfortunately, we cannot do customizations which could potentially take around 2-3 hours to make something work correctly and then always have the risk of future issues with the customization.

“you have to pay to use our theme correctly” ?

You do not need to pay us anything, you can hire any freelancer you want. Just consider getting a quote from on this request.

Well, we explained everything and the issues related to your codes in our previous reply, but you say otherwise. :(

I first wait 1 week before you considered the bug connecting to this forum

  1. We would like to re-iterate again that there was no bug with the Forum Logins as previously mentioned and works fine for all the customers, instead there was issue only with your account since we modified your Support License and added extra 60 days to it as requested by you earlier which is why there was a date mismatch. This is why it took us time to find out the exact issue with your account.

to erase my comment

  1. You can contact Envato to re-instate your Comment: https://help.market.envato.com/hc/en-us/requests/new .

We assure you that we are always here to help you within the Item Support Guidelines. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Dec 7, 2017

So we suspect that after repairing the Database, your reply might have displayed late than the original posted date.

Hmm what are you talking about? I know exactly when I replied, it was the 5th of december, 2017 at 5:07 PM. This is the real date and it stick exactly with the time I posted it. It is the answer to YOUR reply from the same day (during the 5th of december) but artificially predated from the 30 th of november at 9:31 PM. I know it as I reloaded this page everyday from the 29th.

  1. We have been providing support for a long time now and if we are late, we are late. There is no excuse and there is no reason for us to predate our replies. We have checked out the Server and Forum Logs and the issue appears to be with the Revision Updates, we made an update to the bbpress database and optimized it on 5th December to clear any inconsistencies which might have caused the replies to not display. So we suspect that after repairing the Database, your reply might have displayed late than the original posted date. We will make sure that this does not happen again.

In this case why not just writing it directly. Instead of deleting the part of my message that highlights the fact that the date of your message doesn't stick with the reality and has been predated. From my point of view it looks like you tried to hide stuffs 1/ you predate your message, hoping that I didn't came back to see if an update had been posted 2/ you delete the sentence that highlights it in my next reply from the 5th of december 3/ you don't even mention it in your next message. 4/ no email sent to notify that there is a new reply on the topic. Looks really strange isn't it ? Can you see the point ?

In fact, I complain about this, because it has already happened to me on your forum (and it seems to a lot of other people) in the past, and finally you say we have already answered X days ago, while we are waiting for it. Guys, you don't even send an email to notify there is a reply to a post! Shouldn't it be a basic feature on a forum ?

So, ok let's say you are of good faith. You know, between this 'inconsistency' plus the one when I renewed the licence ( maybe that was a special case, I understand, but anyway you didn't even considered my warning messages on envato comments ). Now we are like at +2 weeks after the licence renewal and I am still losing time because I don't know how to fix this menu issue. Exactly the same point.....
So let me know what is your solution, I won't blame you if there is future issues. I am sure that it is possible as you already can load AJAX portfolio and relaunch plugins after the dom has been updated.

And please, enable the email notification when a reply is created. Thank you.

SSemicolon WebSTAFFDec 7, 2017

Hello,

Hmm what are you talking about? I know exactly when I replied, it was the 5th of december, 2017 at 5:07 PM. This is the real date and it stick exactly with the time I posted it. It is the answer to YOUR reply from the same day (during the 5th of december) but artificially predated from the 30 th of november at 9:31 PM. I know it as I reloaded this page everyday from the 29th.

We can't explain you more regarding this since we already mentioned that this was a Database repair issue and not all the replies were affected. Just a few of them from 29th November (New WordPress Release update) to 5th December (the day we updated the Databases). So nothing more to explain in this regard.

In this case why not just writing it directly. Instead of deleting the part of my message that highlights the fact that the date of your message doesn’t stick with the reality and has been predated. From my point of view it looks like you tried to hide stuffs 1/ you predate your message, hoping that I didn’t came back to see if an update had been posted 2/ you delete the sentence that highlights it in my next reply from the 5th of december 3/ you don’t even mention it in your next message. 4/ no email sent to notify that there is a new reply on the topic. Looks really strange isn’t it ? Can you see the point ?

  1. Which part of the Reply was deleted? 2. We do not Predate messages. Period. 3. Not sure what you are talking about. 4. ? 5. We are working on this and surely enable this soon enough (we did not enable this earlier because of SPAM issues).

So, ok let’s say you are of good faith. You know, between this ‘inconsistency’ plus the one when I renewed the licence ( maybe that was a special case, I understand, but anyway you didn’t even considered my warning messages on envato comments ). Now we are like at +2 weeks after the licence renewal and I am still losing time because I don’t know how to fix this menu issue. Exactly the same point…..

Firstly, there is no Menu Issue. The Menu has caused issues because of your Custom Codes and also not following the Solutions (PHP) we have already provided to you. It would have been great if you could have asked us whether support on this request was included before renewing the support.

Solution:
We have worked on this Solution for the past 2 Hours! You can consider using this File: https://www.dropbox.com/s/nhenenr5113b0i4/header-footer-include.html?dl=1 . Make sure, that you set the data-loader-timeout Attribute on the <body> tag, else the Page Transition feature will not work properly. This Solution works for us and this is the only solution we have. Unfortunately, we will not be able to provide any further support on this. Thanks for your Co-operation.

Meanwhile, to let you know this is not even SEO Friendly since the Code is loaded via AJAX and does not even exist on the Page so Google will not be able to index the links.

We really do not want to discuss on this matter with you anymore or make you understand that we are always providing support with good faith and Customizations are not entertained within the Support policy. So you are really welcome to request a refund: https://help.market.envato.com/hc/en-us/requests/new and we would approve it. A little bit of politeness goes a far way and we would have worked more than harder to find a solution for you even if it is a complex customization. Because respect is always mutual and while we respect and appreciate every customer, we would really expect the same. No hard feelings. :)

We appreciate all your Patience and really apologize about any inconveniences and delays caused!

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Dec 7, 2017

About the solution : I have tried it yesterday (and almost work the way I want). In fact, instead of a callback with getScript functions.js after the two .load() functions, I embedded the whole code directly inside functions.js into both .load() callback which gives exactly the same result. I also disabled the spinner with .no-transition on body (because of an infinite load) to make it works. But even with this almost perfect solution, there is some part of the code that sometimes don't run : top-social menu on hover in the header doesn't reveal and the isotope function doesn't execute ( I am on the Construction template) and I can imagine some other that are not needed here. That's why, in order to built the menu from the core of functions.js, I was asking you a finer way to initialize and re-instantiate the functions involved in the menu.

About the politeness : sorry, I am usually very patient, but there is a time that it's enough. I started to feel (a very very little) angry when I realized that the new available update of Canvas 4.x was in fact just a way to sell more on black friday --> no problem, it's ok, part of the game. Then, when you didn't even replied my comment about Canvas 5 <-- give an eye! Then, I realized that there was no interest for you to reply as I had just re-bought the licence few minutes earlier --> the job is done, why losing time. About Canvas 5, the ultimate version that should have been available at the end of the past week --> again just a black Friday pitch....... Then, I was a little bit more angry when I understood that, in fact there won't be any update before next year..... but again it's ok, running tests and debugging unexpected issues can delay the deadlines. From here, I started to tell you about the issue I had to post on the support forum. You didn't even give an eye before I post an explicit comment that you censored. Then you ....blablablabla

Do you want me to summarize a bit more your politeness or is it ok ?

SSemicolon WebSTAFFDec 8, 2017

Hello,

Since you are using this code on the Localhost the 2 loads are working fine. When you go live, your code will not work fine since the jQuery load works asynchronously and the js/functions.js file will not initialize the functions properly. Unfortunately, as we mentioned earlier, we cannot provide you with further support on this and currently cannot change the js/functions.js structure since it works perfectly fine for all the default cases. Frankly, this is the first time we have seen JS being used to include HTML on a Page.

Well we don't understand, why were you angry? Didn't you upgrade your Support License for a lower price? We just mentioned it to you that Canvas 5 will be available soon and did not really release it publicly to garner more sales. And Canvas 5 is a Huge Update which will be available for Free for all the Users of Canvas, no matter if they have Support License or not. Meanwhile, the delay is because Canvas 5 is upgraded to Bootstrap 4 and the code has changed considerably and so its a big task to change 900 Files, 50+ Plugins and make everything work correctly.

Well thanks for your Patience and Do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Dec 11, 2017

Frankly, this is the first time we have seen JS being used to include HTML on a Page.

Noooo, really ?? Again, are you kidding me or maybe you are using the template of someone else ?? I want you to let me know what king of technology you are using to load HTML external files in those pages : Infinity scroll, Blog masonry or in Blog timeline

Sorry, but you are such a joke...
Of course, in your demo everything is converted in PHP for your own reasons. But you know, the files downloaded are all in HTML, that's why your solution that tells using an include in PHP don't suit with my needs. I haven't choose a PHP template but a HTML5 template as it is written in your main title. And as it is demonstrated in the 3 pages mentioned above, you are able to load HTML code inside HTML. So what is so difficult for you to just enable a little snippet of HTML inside a page ??

Well we don’t understand, why were you angry?

In addition to my reply from the 7th of december, you can add this to answer this question. Also you can read this entire thread, I am sure you will find the reason.

WWebink74Dec 12, 2017

How do you load HTML external files in those pages and do how you re-run JS plugins and functions :
Infinity scroll
Blog masonry
Blog timeline

How do you initialize the flex slider of the freshly added portfolio items from the page http://themes.semicolonweb.com/html/canvas/portfolio-infinity-scroll-2.php, which is an HTML file in the downloaded version of Canvas.

Also, let me know if the template is developed by you or someone else ? If it is not you, can I speak directly with the person or organization in order to solve the question directly.

Thank you

SSemicolon WebSTAFFDec 12, 2017

Hello,

Allow us to rephrase: Frankly, this is the first time we have seen JS being used to include HTML on all the Pages instead of PHP Include.

Shortcodes and Widgets can be reinitialized but the Fundamentals blocks on the Page cannot.

Also, we would love to hear your thoughts on this: https://themeforest.net/page/item_support_policy .

It is important for you to understand that we are more than happy to help you with the features, fix issues and bugs for what is included within Canvas and but we will not support Customizations as we really do not have the time to create custom codes or provide support for your custom codes. There is no reason to get angry on this as this is the support policy common with all the items on the marketplace.

Hope you understand.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Dec 13, 2017

Allow us to rephrase: Frankly, this is the first time we have seen JS being used to include HTML on all the Pages instead of PHP Include.

Ok I think I see what you mean, but after all, why not ? If I use the Ajax portfolio on one page, the blog timeline on an other, an ajax loaded JSON on 2 other ones with JS templating, finally it is equally if not heavier than a little snippet of HTML code. You know if everybody always used PHP, frameworks like angular js, vue js or react wouldn't exist. And for your information, it's been 3 years that Google bots are able to manage javascript and ajax loaded content in body and header of a page.

Then, about the policy, what I asked you is not to customize your template, just making it working above all the functions you have inserted in the functions.js using techno you already use (see the 3 pages above). In fact, I know that what I want to achieve works but not with your template. I wasn't there saying : "I have this blurry idea to do something like this, can you work for me for free?".
No, I came here with the code used and described exactly where and what was the issue. Issue that has already been asked by others and by myself 8 months ago (see the date of the 1st post).... So I just asked you to advise on what to instantiate because, you should know where to act as you should be the theme creator.

SSemicolon WebSTAFFDec 14, 2017

Hello,

Ok I think I see what you mean, but after all, why not ? If I use the Ajax portfolio on one page, the blog timeline on an other, an ajax loaded JSON on 2 other ones with JS templating, finally it is equally if not heavier than a little snippet of HTML code. You know if everybody always used PHP, frameworks like angular js, vue js or react wouldn’t exist. And for your information, it’s been 3 years that Google bots are able to manage javascript and ajax loaded content in body and header of a page.

Unfortunately, our JS codes are currently not designed to support Entire Headers/Footers included via AJAX/JS on a Page since it works differently from other AJAX Features included within the Template. We will consider working on this in our future updates.

Item support does not include services to modify or extend the item beyond the original features, style and functionality described on the item page.

As described above, the feature you are trying to implement has not been described within the Item Description or displayed in any of the Live previews. As you yourself mentioned: I know that what I want to achieve works but not with your template, this feature is not included within Canvas and the JS Codes are not designed to work in this way for the Fundamental Elements like Header, Sliders, Footers to avoid JS Memory overhead issues.

No, I came here with the code used and described exactly where and what was the issue. Issue that has already been asked by others and by myself 8 months ago

Exactly what we mentioned in our previous posts, this is your customized codes(not available anywhere in Canvas) and we are aware of the issues it might generate because of the current structure of the code (which cannot be changed anytime soon because many users are using it right now).

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

WWebink74Dec 14, 2017

Referring to this topic and a lot others, you are very able to customize code that "are not described within the Item Description and displayed in any of the Live previews.". Perfect for him, you provided a solution to its request while it is not shown in demo nor in description, that's nice.

In fact, the point is not that you don't customize the template for customers, no, the point is that the template is not really customizable if we can't even do that without modifying the core structure. And this is not written anywhere. And you make issues to advise because it is not the way you code... After all, you don't know what I need to achieve and for what purpose, so why do you care for me about SEO or JS memory issue ?
So when I ask you what I have to call or where I have to place code to make it work, why is it so complicated ?

We will consider working on this in our future updates.

Ho really!? Good news, you should have done it since a long time, sincerely.

SSemicolon WebSTAFFDec 14, 2017

Hello,

Referring to this topic and a lot others, you are very able to customize code that “are not described within the Item Description and displayed in any of the Live previews.“. Perfect for him, you provided a solution to its request while it is not shown in demo nor in description, that’s nice.

Yes! So we do make Customizations within the scope of the Template and what is possible by tweaking the codes slightly.

In fact, the point is not that you don’t customize the template for customers, no, the point is that the template is not really customizable if we can’t even do that without modifying the core structure. And this is not written anywhere. And you make issues to advise because it is not the way you code… After all, you don’t know what I need to achieve and for what purpose, so why do you care for me about SEO or JS memory issue ?
So when I ask you what I have to call or where I have to place code to make it work, why is it so complicated ?

Haha! Well! We can't really disagree more. :) Just because something is not working because you want it to work according to your codes doesn't mean Canvas is not customizable. There can be 1000s of Usage Scenarios out of which 10 or more will not work. This is a complex request according to the scope of the Template and will take indefinite amount of time to code, debug and recode. This request requires us to code some functions from scratch which we cant really afford to do now. We hope this is definitely not hard to understand. We are selling a Template, not Customizations. Customizations can be implemented by Freelancers only.

In fact, we did try to provide you with a solution right with a working code? But you tried implementing it in a different way and it didnt work. In these type of requests we can only provide pointers and not a tailor-made solution.

You can get in touch with Envato regarding this if you like and take an opinion.

Ho really!? Good news, you should have done it since a long time, sincerely.

If we have enough user requests regarding a feature that needs to be implemented and will benefit a lot of users, we will implement it in our immediate updates. :)

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

WWebink74Dec 14, 2017

We can’t really disagree more. ? Just because something is not working because you want it to work according to your codes doesn’t mean Canvas is not customizable.

No no no, it is not MY code, nor the way I want it to work. I am talking about a jQuery function .load() which is a very common function mixed with your core functions.js file. Both seems to be uncompatible as you are not able to provide a working solution to MY issue because of 'the scope of the Template'. And it is not my issue because other people also faced it.

In fact, we did try to provide you with a solution right with a working code? But you tried implementing it in a different way and it didn't work.

Well no, sorry but really no. You did provide a html file using a .getScript() call. That's right. Unfortunately you didn't even tried it... it doesn't work. Read it again, I told you that I also tried this solution earlier but the isotope and social top-bar weren't running (and by the way, probably other JS based features). Then, I just asked you what to call exactly in the callback function in order to properly re-run plugins.
You will agree that your are very better well placed than me to advise on that.
You will also agree that I am not asking you a deep customization nor a strong over work than anyone else.

SSemicolon WebSTAFFDec 15, 2017

Hello,

No no no, it is not MY code, nor the way I want it to work. I am talking about a jQuery function .load() which is a very common function mixed with your core functions.js file. Both seems to be uncompatible as you are not able to provide a working solution to MY issue because of ‘the scope of the Template‘. And it is not my issue because other people also faced it.

It is your code because you want to implement it in your way. As we mentioned earlier, the fundamental elements will not work for this but the shortcodes/widgets will. A working solution will need 3-4 hours to implement because it requires us to rewrite some of the functions which we are not willing to do right now!

Well no, sorry but really no. You did provide a html file using a .getScript() call. That’s right. Unfortunately you didn’t even tried it… it doesn’t work. Read it again, I told you that I also tried this solution earlier but the isotope and social top-bar weren’t running (and by the way, probably other JS based features). Then, I just asked you what to call exactly in the callback function in order to properly re-run plugins.
You will agree that your are very better well placed than me to advise on that.
You will also agree that I am not asking you a deep customization nor a strong over work than anyone else.

Yes it works but maybe not for all the Elements on the Page because as we mentioned earlier your solution is a complicated one and you will have to do some work by yourself when you are trying to customize a code in a template! We also guess that you have never ordered Customization before which is why you don't understand that time is valuable for freelancers and they charge by time. Meanwhile, try replacing the following code in the file we had provided you earlier:


	jQuery(document).on( 'ready', function(){
		jQuery( '#header-wrap' ).load( 'include/header-html.html', function(){
			jQuery( '#footer' ).load( 'include/footer-html.html', function(){
				$.getScript( 'js/functions.js' );
			});
		});
	});

with the following:


	jQuery(document).on( 'ready', function(){
		jQuery( '#header-wrap' ).load( 'include/header-html.html', function(){
			jQuery( '#footer' ).load( 'include/footer-html.html', function(){
				$.getScript( 'js/functions.js', function(){
					SEMICOLON.documentOnLoad.init();
				});
			});
		});
	});

It works for us!! Unfortunately, this is the final time we are providing you any help on this issue. So any issues you have face further because of this will have to be fixed by yourself or by hiring a freelancer.

Thanks for your all your Patience.

WWebink74Dec 15, 2017

So here it is, 9 lines of code, including 8 lines that I found by myself. It seems working for now.

I don't know what is more time consuming : having to reply in order to avoid answering or to directly say use it : SEMICOLON.documentOnLoad.init(); ?

I don't understand your main problem. CSS --> for free & JS --> hire a freelancer ?
I don't know what's your rate but 3-4 hours for this simple line might be a good earn. And what if I pay and you add it in further version ? Not that the problem is to share it with next customer but finally I pay to make your template better, isn't it a bit strange to charge for it ?

But anyway thank you and don't worry, I won't ask you more if I have further issue with this. I won't ask Envato for a refund and I just will assume my 'mistakes' if there is any issue but I am confident with it.

PS : if it would have to happen, how much would you charge if I really need you to rebuild the functions.js file in order to integrate a feature like this ? Meaning, loading snippet of code in the DOM before it is ready without using : .load(), .getScript() and having to reinitialize it with SEMICOLON.documentOnLoad.init() as callback.

SSemicolon WebSTAFFDec 15, 2017

Hello,

Well it takes a lot of time and experience to come up with a solution like this. The code seems easy but in reality takes time to figure out which corner of the code causes issues. It took us 8 months to build Canvas and we try to perfect each and every corner of a code. So here is an example of Canvas's customizability before you. :)

I don’t understand your main problem. CSS –> for free & JS –> hire a freelancer ?
I don’t know what’s your rate but 3-4 hours for this simple line might be a good earn. And what if I pay and you add it in further version ? Not that the problem is to share it with next customer but finally I pay to make your template better, isn’t it a bit strange to charge for it ?

CSS Support Query asked: took us 4 minutes to figure out. Your JS Support Query: took us more than 3 hours (collectively) to completely understand the issue before coming up with a solution which included us to setup the codes according to your Usage Scenario (since you didnt want to provide us with a Live URL) and debug various variations of the code. The code you see is the end product of more than 20 tests. :)

So a very ignorant statement on your part and truly disheartening. Do you do freelancing? Btw we doubt anyone would try use JS to include headers/footers on their website. And so we wont add this in Future Versions anytime soon.

And nope you are wrong! You are paying only for the Template and the Support that comes with it for the features described. The result of this solution was you pushing us way too much to provide you with a Solution of a feature not included with Canvas.

PS : if it would have to happen, how much would you charge if I really need you to rebuild the functions.js file in order to integrate a feature like this ? Meaning, loading snippet of code in the DOM before it is ready without using : .load(), .getScript() and having to reinitialize it with SEMICOLON.documentOnLoad.init() as callback.

We don't support Customizations. Too much of a headache. :/ Btw, the code above does not use any Reinitializing. Everything gets initialized for the first time.

Anyways, Thanks for all your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard