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

Supporting inconsistent content elements #169

arvgta opened this issue Jul 5, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jul 5, 2019

The previous issue, which was a pre-requisite for this one has finally been implemented, with no errors reported yet.

New validation of the main jQuery selector

Within the _ld() function, which loads a single content element from the target page, the following validation code is new (at the very beginning):

if(typeof $h[0] == "undefined") { //target element not defined on target page
    //handle inconsistent elements
    return; //Skip this element and continue - skip the rest of the _ld() function

The new functionality kindly requested by an advanced Ajaxify user via email:
(please ignore for the moment - just making a record of an excerpt of the initial email contents for my own notes:)

You could offer the following new functionality:

"Permanent Selectors" for all consistent elements (present on all webpages) example: Navigation, Main Content, Footer.

"Local Selectors" for inconsistent elements (present on at least one webpage) example: Background image, Image Slider. Both "Local Selector" examples could be present on only a couple of pages,
imagine a slider that is permanent on only 4 of the 20 pages were the slider stay's and content below changes. The same for background images, sometimes only used on the Home page.

The code could be:

jQuery('#main, #header-stay, #footer-stay').ajaxify({'selector':'#header-stay a, #footer-stay a','verbosity': 2, scrolltop: true, alwayshints: "leaflet-embed", localSelectors:"#background-image, #imageSlider"});

Hope it makes sense to you, but from a designers point of view this would be ideal!

@arvgta arvgta changed the title Content element validation with new warning message Content elements validation with new warning message Jul 8, 2019

@arvgta arvgta changed the title Content elements validation with new warning message Content elements' validation with new warning message Jul 8, 2019

@arvgta arvgta changed the title Content elements' validation with new warning message Supporting inconsistent content elements Jul 8, 2019

@arvgta arvgta removed the question label Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.