
Charles asks…
Why can I view my HTML/CSS site locally but not on my server?
I downloaded a free template that consists of html css and uses jquery for animations. It is not optimized for anything. For some reason I can’t view the css and jquery part only html. But I am able to see if fully on my local machine. Weird. So I’m on a shared cpanel server with all the necessary services to run a dinky site like this. Does anybody know why it’s not properly showing up? Oh and the way everything is linked in the html is by ./folder/file.extension Which I myself have used and work. It’s a linux server so there’s no possible way that that link shouldn’t work.
The only error I pull up in Chrome’s Developer Tools is “Uncaught ReferenceError: $ is not defined”
Here’s the location:
<script src=”http://networkslice.com/_assets/js/jquery-1.6.1.min.js” type=”text/javascript”>
<script src=”http://networkslice.com/_assets/js/jquery.mfxTooltips.js” type=”text/javascript”>
<script src=”http://networkslice.com/_assets/js/jquery.slider.js” type=”text/javascript”>
$(document).ready(function() {
###ISSUE ABOVE THIS LINE##### networkslice.com:336Uncaught ReferenceError: $ is not defined
// Slider
$(‘#slider’).slider();
// Placeholder input fields
$(‘.placeholder’).each(function() {
var $this = $(this);
var defaultVal = $this.attr(‘title’);

Administrator answers:
I think it is this line:
$(document).ready(function() {
I think it should be
document.ready(function) {
The ‘$’ is for php code variables, not JavaScript.

Lisa asks…
Is there a bible of computer programming? Or any good books programmers should have?
For someone who builds websites semi professionally, but still has more to learn. The languages they use are:
php, javascript, jquery, xhtml and css.

Administrator answers:
Just pick one to start out with. You don’t just learn one language, you start out with one and eventually through practice you expand and overlap onto a new language. You can start at php, personally the easiest, or javascript. You can eventually expand to html or C++ and so on. As for just one giant book there is no such thing. If there was then everyone would be a programmer.

Michael asks…
How do I replace the select options form with a drop down menu?
Im thinking of using this http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx
heres the demo http://www.jankoatwarpspeed.com/examples/reinventing-drop-down/

Administrator answers:
Drop-Down Menus, Horizontal Style: http://www.alistapart.com/articles/horizdropdowns/
The Right Way to Make a Dropdown Menu: http://www.sitepoint.com/blogs/2009/04/01/the-right-way-to-make-a-dropdown-menu/
Ron

Jenny asks…
How do I tile an image vertically and stretch it horizontally?
The image is sensitive in width – it needs to stretch to the contents of the screen. However, it also blends and repeats vertically. Is there a way to do this without either creating a giant image or resting one on top of the other? I can use CSS, HTML, and JQuery/Javascript to accomplish this.

Administrator answers:
Background images can not be stretched using CSS level 2.
However it can be simulated by positioning elements (such as divs) on top of each other, with the one on the bottom being used as the background with images.
Here is a demo:
html, body { height: 100%; }
div#background {
z-index: 1;
margin:0;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow:hidden;
}
div#background div img {
width:100%;
height:100px;
}
div#content {
z-index: 999;
position: absolute;
top: 5px;
left: 5px;
}










Stretch and Repeat Background
The background to this page is stretch horizontally and repeated vertically.
Rather than repeat

multiple times, these repeats could be achieved using Javascript. The script would determine the height of the window, divide by the height of the background image, round up the answer, repeat the image that many times.
For more on the script tag, that you would need to include some Javascript, see: http://www.html-tags-guide.com/html-script-tag.html

Richard asks…
How to create a jQuery-like effect?(e.g. slideToggle())?
I’m creating recently a basic HTML-JavaScript-CSS webpage and my goal is to make a similar jQuery effect using only the basics of the Javascript functions and some sort of libraries saved on a browser.
Can you help me to do this? Please…

Administrator answers:
Why not just go ahead and use jQuery?
You don’t need to save it on any particular server, if that’s your concern. You can link to one of various public servers that host jQuery for public use. E.g.:
<script type=”text/javascript”
src=”http://code.jquery.com/jquery-1.5.min.js”
Then just use whatever part of jQuery you happen to need.
Powered by Yahoo! Answers
















