jQuery(document).ready(function( $ ){
const popularSearches = [
{
text: ‘maternity photoshoot’,
url: ‘/maternity-photography-perth’
},
{
text: ‘newborn photography perth’,
url: ‘/newborn-photography-perth’
},
{
text: ‘family photoshoot’,
url: ‘/family-photography-perth’
},
{
text: ‘events photographer’,
url: ‘/event-photography-perth’
},
{
text: ‘product photography’,
url: ‘/product-photography-perth’
},
{
text: ‘commercial photographer’,
url: ‘/commercial-photography-perth’
},
{
text: ‘food photography’,
url: ‘/food-photography-perth’
},
{
text: ‘perth wedding photographer’,
url: ‘/wedding-photography-perth’
},
{
text: ‘couples photography perth’,
url: ‘/couples-photography-perth’
},
{
text: ‘boudoir photography perth’,
url: ‘/boudoir-photography-perth’
},
{
text: ‘corporate photography perth’,
url: ‘/corporate-photography-perth’
},
{
text: ‘corporate headshot photography’,
url: ‘/corporate-headshot-photography-perth’
},
{
text: ‘personal branding photography perth’,
url: ‘/personal-branding-photography-perth’
},
{
text: ‘portrait photography perth’,
url: ‘/portrait-photography-perth’
}
]

let html = ‘

// HERE APPENDS THE LIST TO THE FOOTER
$(‘[data-elementor-type=”footer”]’).append(html)

let show = false
$(‘.popular-searches label’).on(‘click’, function () {
$(‘.popular-searches label + div’).toggle()
show = !show

if (show) {
$(this).text($(this).data(‘hideText’))
$(‘html, body’).animate({ scrollTop: $(document).height() }, 700)
} else {
$(this).text($(this).data(‘showText’))
$(‘html, body’).scrollTop($(document).height() – 1000)
$(‘html, body’).scrollTop($(document).height())
}
})
});