Simpleweather.js interfering with Concrete 5.7 interface
Permalink
Hi all,
I'm hoping someone might be able to shed some light on a conflict I'm having between simpleweather.js and Concrete5 5.7 interface.
When I add the required
Into my settings.js file, all of a sudden Concrete5's (5.7) edit menu stops sliding out the selected panels such as 'publish' and 'dashboard'. If I click on the dashboard button, it takes me directly to index.php/dashboard which is somewhat acceptable but when I click on any of the three left side buttons, they simply show an animated blue circle like they are loading.
Any help on resolving this conflict would be greatly appreciated.
I'm hoping someone might be able to shed some light on a conflict I'm having between simpleweather.js and Concrete5 5.7 interface.
When I add the required
$(document).ready(function() { $.simpleWeather({ location: 'Traralgon, Australia', unit: 'c', speed: 'kph', success: function(weather) { html = '<h2>'+weather.city+', '+weather.region+'</h2>'; html += '<div style='width:50%;float:right;'><i class='current icon-'+weather.forecast[0].code+''></i></div><p class='current'>'+weather.temp+'<sub>°'+weather.units.temp+'</sub></p>'; html += '<div class='clearfix'></div><ul class='sidebar-list'>'; for(var i=0;i<weather.forecast.length;i++) { html += '<li><span style='font-weight:700;'>'+weather.forecast[i].day+'</span><span><i class='icon-'+weather.forecast[i].high+''></i></span><span>'+weather.forecast[i].low+'<sub>°'+weather.units.temp+'</sub></span><span>'+weather.forecast[i].high+'<sub>°'+weather.units.temp+'</sub></span></li>'; } html += '</ul>'; $('#weather-sidebar').html(html); },
Viewing 15 lines of 19 lines. View entire code block.
Into my settings.js file, all of a sudden Concrete5's (5.7) edit menu stops sliding out the selected panels such as 'publish' and 'dashboard'. If I click on the dashboard button, it takes me directly to index.php/dashboard which is somewhat acceptable but when I click on any of the three left side buttons, they simply show an animated blue circle like they are loading.
Any help on resolving this conflict would be greatly appreciated.
Hi MrKDilkington,
No errors in the console unfortunately.
No errors in the console unfortunately.
are the degree symbols in your snippet caused by this site converting the entities or are they like that in your script?
are the degree symbols in your snippet caused by this site converting the entities or are they like that in your script?
Hi AndyJ,
I can seem to see to any degree symbols in the snippet so I am going to guess that it is browser/site related.
I can seem to see to any degree symbols in the snippet so I am going to guess that it is browser/site related.
I have implemented simplewhether with concrete5.7 and it is working fine.
Download the js file fromhttps://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.0.2/jq...
Just go to your active theme folder and copy paste the file jquery.simpleWeather.js file . Now go to the footer.php of your active theme.
and paste the code written below
<div id="weather"></div>
<script src="<?php echo $this->getThemePath(); ?>/js/jquery.simpleWeather.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.simpleWeather({
location: 'Austin, TX',
woeid: '',
unit: 'f',
success: function(weather) {
html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'°'+weather.units.temp+'</h2>';
html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
html += '<li class="currently">'+weather.currently+'</li>';
html += '<li>'+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+'</li></ul>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>'+error+'</p>');
}
});
});
</script>
Download the js file fromhttps://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.0.2/jq...
Just go to your active theme folder and copy paste the file jquery.simpleWeather.js file . Now go to the footer.php of your active theme.
and paste the code written below
<div id="weather"></div>
<script src="<?php echo $this->getThemePath(); ?>/js/jquery.simpleWeather.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.simpleWeather({
location: 'Austin, TX',
woeid: '',
unit: 'f',
success: function(weather) {
html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'°'+weather.units.temp+'</h2>';
html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
html += '<li class="currently">'+weather.currently+'</li>';
html += '<li>'+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+'</li></ul>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>'+error+'</p>');
}
});
});
</script>
I gave this a try with the exact same results.... Slideout panels either don't open or default to the actual page (such as Dashboard), no sliding functionality.
I could hide the script when in edit mode however I am worried it may be the sign of something else.
I could hide the script when in edit mode however I am worried it may be the sign of something else.
can i have a look of your website?
Hi Pluto,
That would be great... I'll put together a sample within a day or so as it's currently on an XAMPP install. I will PM the details to you.
Thanks for taking a look into it. Much appreciated.
That would be great... I'll put together a sample within a day or so as it's currently on an XAMPP install. I will PM the details to you.
Thanks for taking a look into it. Much appreciated.
Do you have any errors in your browser console?