zWeatherFeed options? - asp.net-mvc

I used zWeatherFeed to show weather, but I cant find any example to change options.
<style>
.weatherItem{padding-left:200px;}
.odd{height:130px;}
.weatherCity{font-weight:bold;}
.weatherFeed{height: 130px; width: 100%;}
</style>
<script type="text/javascript">
$(document).ready(function () {
$('#test').weatherfeed(['TUXX0015']);
});
</script>
<div id="test">
</div>
For example I want to show next day too. Is there any example about this weather plugin or any alternative weather plugin? I prefer to use zWeatherFeed because This plugin has great visualization.
Thanks.

The zWeatherFeed plugin is not able to show the next day's forecast at present (although provides a link for a full forecast). The available options are:
unit - Specifies the units to return: 'c' - celsius, 'f' - fahrenheit
image - If true, displays an image of the weather condition in the
background.
highlow - If true, includes the high and low values in each item.
wind - If true, includes the wind direction and strength in each
item.
link - If true, includes the link to full forecast on the Yahoo!
website.
showerror - If true, displays a message if the feed is unavailable or
the location is invalid.
linktarget - Specifies the target for forecast links ('_blank',
'_self', '_top', framename).
woeid - If true, uses Yahoo! WOEID indentifiers for locations
http://www.zazar.net/developers/jquery/zweatherfeed/

<script type="text/javascript">
$(document).ready(function () {
$('#weatherDiv').weatherfeed(['EIXX0048'], {
forecast: true
});
});
</script>
If you add the option
forecast:true
to the options for the function and it will show the forecast for the next 5 days. An full example can be seen at:
http://www.zazar.net/developers/jquery/zweatherfeed/example_forecast.html

Related

How to filter search using tablesorter

I'm using the tablesorter search/filter plugin to search names from a list. so when i type in a letter corresponding to the letters in the list will display. I used this: http://mottie.github.io/tablesorter/docs/example-widget-filter-external-inputs.html as a reference.
Below is my code:
var $table = $('#table').tablesorter({
sortList: [[0,0], [1,0]],
theme: 'blue',
widgets: ["zebra", "filter"],
widgetOptions : {
filter_columnFilters: false,
filter_saveFilters : true,
}
});
$.tablesorter.filter.bindSearch( $table, $('.search-subaccounts') );
HTML:
<input class="search-subaccounts" type="search" data-column="1"/>
I'm trying to filter names based on first name.
so when i try to execute it, gives me the following error:
Uncaught TypeError: Cannot read property 'bindSearch' of undefined
I dont know why it says 'filter' is undefined whereas i tried executing exactly the way its in the demo. What did i do wrong here?
Any ideas??
It sounds like the widget file isn't being included since the bindSearch function isn't being found - it's included with the filter widget. Make sure you load the following files on your page (theme file name will vary depending on your choice):
<link rel="stylesheet" href="css/theme.blue.css">
<script src="js/jquery.min.js"></script>
<script src="js/jquery.tablesorter.min.js"></script>
<script src="js/jquery.tablesorter.widgets.min.js"></script>

I want the Mapquest OSM Geolocation to automatically show your current location but it's not?

Currently I have to press a on the top right-hand corner of the map to show my current location (it is the little person in the picture), is there a way for when the map load it automatically shows your location? I attached the code as well and a picture to explain. Thanks, I apologize in advance for my lack of knowledge.
<html>
<head>
<script src="http://open.mapquestapi.com/sdk/js/v7.0.s/mqa.toolkit.js?key=Kmjtd%7Cluua2qu7n9%2C7a%3Do5-lzbgq"></script>
<script type="text/javascript">
/*An example of using the MQA.EventUtil to hook into the window load event and execute defined function
passed in as the last parameter. You could alternatively create a plain function here and have it
executed whenever you like (e.g. <body onload="yourfunction">).*/
MQA.EventUtil.observe(window, 'load', function() {
/*Create an object for options*/
var options={
elt:document.getElementById('map'), /*ID of element on the page where you want the map added*/
zoom:13, /*initial zoom level of map*/
latLng:{lat:40.735383, lng:-73.984655}, /*center of map in latitude/longitude*/
mtype:'osm' /*map type (osm)*/
};
/*Construct an instance of MQA.TileMap with the options object*/
window.map = new MQA.TileMap(options);
MQA.withModule('geolocationcontrol', function() {
map.addControl(
new MQA.GeolocationControl()
);
});
});
</script>
</head>
<body>
<div id='map' style='width:750px; height:280px;'></div>
</body>
</html>
Based on the documentation, you could try calling activate on the geolocation control after you create it.
If that does not cause a re-center/zoom then you may need to register a handler for the onLocate callback (also in the control). When your callback is called you can manually re-center/zoom the map.
Bear in mind that geolocation can be very inaccurate, doing it automatically will probably annoy users for whom that is the case.

Fusion chart not printing in the print

i have a fusion chart and i want to print it but in the place of chart i am getting blank space.
Here is the code..
<script type="text/javascript">
function selectBehaviourTypes(id){
$.post('/reports/tbchart', {Guid: id, Chart:"yes"}, function(response)
{
$("#chart_div").html(response);
});
}
</script>
<div style="float: right"><img src="<?=$this->baseUrl('/images/icons/small/print.png')?>" title="Print" alt="Print" /></div>
<div id="div_print">
<div id="chart_div"></div>
</div>
Help me out
regards
uday
The charts rendered are displayed properly on screen but printed output had been not proper try using PrintManager class for printing.
Print Manager takes a bit of time to prepare all the charts ready for printing.If print action is invoked while the Print Manager is not yet ready with the image, the chart does not show up in the print media. The function managedPrint() is called, it automatically waits for the chart to get ready before it proceeds to call the window.print() function.
For more information, please refer to : FusionCharts Print Manager Documentation

How to get a tooltip like balloon on click of a button using jquery

am pretty new to jquery. I need to bring out a balloon on double clicking a word. (exactly like a google dictionary). Can anyone help me ..
awaiting for positive response.
Thanks in advance,
Sruthi.R
jQuery has a dblclick event that you listen for and take action. For example:
<p>Hello World</p>
<script>
$(function() {
$('p').on('dblclick', function() {
//Show the tooltip here.
});
});
</script>
Here's a live example of this - http://jsfiddle.net/5Xj7A/
The jQuery UI official tooltip plugin is in 1.9 which has yet to be released, but there are a ton of jQuery tooltip plugins you can to implement the actual tooltip depending on what you're looking for. There's a big list here - http://www.1stwebdesigner.com/css/stylish-jquery-tooltip-plugins-webdesign/.

can't hook JQuery quickSearch to the table - MVC

I am trying to use quickSearch from http://lomalogue.com/jquery/quicksearch/ website. I don't know how to hook to the table so I hoping someone could be kind enough to help me here. I am using VS 2010 MVC 3, in C#, ADO.NET. Thanks in advance. I had a look at related question on the website, if there is a technical gitch? Is there alternative solution? Thanks in advance.
View file Index.cshtml looks like this...
Edited
<script type="text/javascript">
$(function () {
$("table.tablesorter").tablesorter({ widthFixed: true, widgets: ['zebra'],
sortList: [[0, 0]] })
.tablesorterPager({ container: $("#pager"), size: $(".pagesize
option:selected").val() });
});
</script>
<script type="text/javascript">
$(function ()
{
$('input#search').quicksearch('table tbody tr', {selector:'th'});
}
);
</script>
</p>
<table class="tablesorter">
Also it could solve any code organisation problems if you are to wrap the JQuery statement in this
$(document).ready(function() {
$('input#search').quicksearch('table tbody tr', { selector: 'th' });
});
Also the table quick search plugin i use is JQuery table search plugin, it works well and if you just take a quick look at the demo it is rather easy to implement and does not clash with most other JQuery table plugins.
While I haven't used QuickSearch before, and I'm not sure if it'll solve all of your problems, but as a start it appears that you've put your first script element too early in your document.
You need to put it after the other script elements.
this:
<script type="text/javascript">
$('input#search').quicksearch('table tbody tr', { selector: 'th' });
</script>
should appear after the the jquery script, and the quicksearch script elements. If you include it before, the browser doesn't know what $ and $(selector).quicksearch is.
btw: this:'input#search' selector is not needed.
you can use the #search selector to same effect, becuase searching by id is a one command in JS.

Resources