Page 1 of 1

Fixed Header (Template #6 )

Posted: Fri Jan 04, 2019 11:48 pm
by Williams
A very modern and attractive header i found in template 6 on this link
http://www.wysiwygwebbuilder.com/suppor ... asic6.html

And while i'm trying to figure out how this header works, i have found a custom code on the page. unfortunately this code does't work with me when i copied this code and past in a demo page with a break points. however it works good with layout grid!! Am i missing something!! And is there another way to achieve same effect like event or something in the layer options!!

What i exactly need to do is a fixed layer in any where on a page. and the same header works as a docking top when this layer become in the header of a screen while scrolling down the page. that's exactly what you'll see in template 6.

Many Thanks..

Re: Fixed Header (Template #6 )

Posted: Sat Jan 05, 2019 12:17 am
by Bluesman
Williams wrote: Fri Jan 04, 2019 11:48 pm A very modern and attractive header i found in template 6 on this link
http://www.wysiwygwebbuilder.com/suppor ... asic6.html

And while i'm trying to figure out how this header works, i have found a custom code on the page. unfortunately this code does't work with me when i copied this code and past in a demo page with a break points. however it works good with layout grid!! Am i missing something!! And is there another way to achieve same effect like event or something in the layer options!!

What i exactly need to do is a fixed layer in any where on a page. and the same header works as a docking top when this layer become in the header of a screen while scrolling down the page. that's exactly what you'll see in template 6.

Many Thanks..
This is one way:
https://www.youtube.com/watch?v=LPv7jAA ... iQ&index=9

Or this extension maybe: http://www.magnawebstudio.com/demo/reve ... /main.html

Re: Fixed Header (Template #6 )

Posted: Sat Jan 05, 2019 8:01 am
by Pablo
If the code does not work then the ID of the objects and the script probably do not match.

In the template the ID of the layout grid is 'navigation'. If your object has a different ID then you will need to modify the code.

Re: Fixed Header (Template #6 )

Posted: Sat Jan 05, 2019 1:06 pm
by Williams
Thank you Blueman for your help. but actually that's not what i'm asking about..

Pablo. i already did that but it doesn't work for me. pls take a look

https://demo1.getsitesolutions.com/template6.rar

Many thanks

Re: Fixed Header (Template #6 )

Posted: Sat Jan 05, 2019 1:12 pm
by Pablo
Can you please share the file in standard zip format?

Re: Fixed Header (Template #6 )

Posted: Sun Jan 06, 2019 10:23 pm
by Williams

Re: Fixed Header (Template #6 )

Posted: Mon Jan 07, 2019 7:18 am
by Pablo
I'm sorry, my computer does not support RAR.
Can you please share the file in standard ZIP format?

Re: Fixed Header (Template #6 )

Posted: Thu Jan 10, 2019 12:06 am
by Williams

Re: Fixed Header (Template #6 )

Posted: Thu Jan 10, 2019 7:33 am
by Pablo
There are a few issues why this does not work.
- #wb_Layer2 should be #Layer2
- jQuery is not included -> add $JQUERY$ to the resources of the HTML object or include an object that uses jQuery.
- affix.js should be affix.min.js (in resources)
- The layer is not floating so affix does not work because the layer has an absolute position.

Re: Fixed Header (Template #6 )

Posted: Thu Jan 10, 2019 2:52 pm
by Williams
Thank Pablo for your reply,

What do you exactly mean with " jQuery is not included -> add $JQUERY$ to the resources of the HTML object or include an object that uses jQuery.

And how to change the layer to be floating!

Thank you again..

Re: Fixed Header (Template #6 )

Posted: Thu Jan 10, 2019 3:19 pm
by Pablo
The HTML code (affix) requires jQuery. On your page there are no objects that use jQuery so you will need to add it yourself.

You can set the layer mode to 'floating layer' the properties of the layer.

Re: Fixed Header (Template #6 )

Posted: Thu Jan 10, 2019 10:32 pm
by Williams
Pablo wrote: Thu Jan 10, 2019 7:33 am There are a few issues why this does not work.
- #wb_Layer2 should be #Layer2
- jQuery is not included -> add $JQUERY$ to the resources of the HTML object or include an object that uses jQuery.
- affix.js should be affix.min.js (in resources)
- The layer is not floating so affix does not work because the layer has an absolute position.
From where i can change the affix.js file to be affix.min.js!! Do you mean the Html Code!
And can i add any item under Jquery UI / Bootstrap!

Thanks again..

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 6:44 am
by Pablo
Either add an object that uses jQuery or add
$JQUERY$
to the resources list in the HTML object (above affix.min.js)

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 10:14 am
by Williams
Does't work for me :roll:
Pls check

http://demo1.getsitesolutions.com/demo1.zip

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 10:23 am
by Psycho
Have you tried setting the bottom layer via Object Properties/General and making the mode a Sticky Layer and the Delay set to 0

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 10:29 am
by Pablo
1.
'JQUERY' should be '$JQUERY$'

2.

Code: Select all

$("#Layer2").affix({offset:{top: $("Layer2").offset().top}});
should be

Code: Select all

$("#Layer2").affix({offset:{top: $("#Layer2").offset().top}});
3.
The layers are not set to floating.

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 10:34 am
by Williams
yes, but that's not what we're playing around..
pls check http://www.wysiwygwebbuilder.com/suppor ... asic6.html to get exactly what i need to do.

Thank you Psycho for your help..

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 10:43 am
by Williams
Pablo wrote: Fri Jan 11, 2019 10:29 am 1.
'JQUERY' should be '$JQUERY$'

2.

Code: Select all

$("#Layer2").affix({offset:{top: $("Layer2").offset().top}});
should be

Code: Select all

$("#Layer2").affix({offset:{top: $("#Layer2").offset().top}});
3.
The layers are not set to floating.
Excellent Pablo,
It works that way. but there is a blank space in the header of the page. it looks like the same size of layer1.
so how we can fix this!

http://demo1.getsitesolutions.com/demo2.zip

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 11:29 am
by Pablo
Please set all layers to floating...

Re: Fixed Header (Template #6 )

Posted: Fri Jan 11, 2019 12:34 pm
by Williams
Aha got you. you mean the layer mode under location and size not the position children.
yes yes it works perfect now. Thank you very much Pablo..

Here's the final demo project for those who are interested about this trick.. :wink:

http://demo1.getsitesolutions.com/demo3.zip

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 12:52 pm
by Williams
Pable,

It doesn't work for me using a master page!
Am i missing for something or this is a bug!


http://demo1.getsitesolutions.com/project1.rar

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:07 pm
by BaconFries
Link url invalid but I have rectified this. Note probably best to make it a zip rather than rar.

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:10 pm
by Pablo
Please use standard zip format.

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:15 pm
by Williams
Thanks guys for the quick response.
here is the file again


Demo1.getsitesolutions.com/project1.zip

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:18 pm
by BaconFries
Please always provide the full url including the https:// or http://

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:19 pm
by Williams
please copy and past the file into your browser..
it works fine with me

http://demo1.getsitesolutions.com/project1.zip

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 1:53 pm
by Pablo
Your example works.
However, the layer with the image (Layer3) is on top of the affixed layer.
So, you will need to add a z-index to the affixed layer.

Also, if you are using floating layers then the content place holder should also be floating.

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 2:04 pm
by Williams
Could you clarify more pls what you exactly mean with
So, you will need to add a z-index to the affixed layer.
i have changed the content place holder to be floating, and the image of index as well. however the same result still exists

it works fine in the master page. but doesn't work in the homepage!!

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 2:09 pm
by Pablo
it works fine in the master page. but doesn't work in the homepage!!
It does work. However, the affixed layer is behind the image!
Could you clarify more pls what you exactly mean with
For example:

Code: Select all

#Layer2.affix
{
    z-index: 9990 !important;
}

Re: Fixed Header (Template #6 )

Posted: Fri Feb 15, 2019 4:04 pm
by Williams
Thank you pablo for your kind support..

maybe that's strange!! but that's what happened and it works fine for now... i have changed content place holder to expand overflow and and set the layer2 to front.. That's all :D

Here's the project if anyone is interested..

Demo1.getsitesolutions.com/home.zip

Pls let me know if you have any comments.. and thank you again for your efforts..