Ok I have the css sorted:
Now to style the input box ( but this isnt working ) any suggestions. Think my js is mes开发者_开发知识库sed up. The html element:
<input name="latLng" class="latLng" id="latLng2" type="text" disabled />
The JS:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('input.latLng').locationPicker({
width: "500px",
height: "20px",
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10
});
});
</script>
Where am I going wrong please.
To set styles, use .css()
for the styling of the element and call your plugin separately, like this:
jQuery(document).ready(function(){
jQuery('input.latLng').css({
width: "500px",
height: "20px",
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10
}).locationPicker();
});
Or, a bit shorter:
jQuery(function($){
$('input.latLng').css({
width: 500,
height: 20,
backgroundColor: '#fff',
border: '1px solid #ccc',
borderRadius: 10,
padding: 10
}).locationPicker();
});
精彩评论