Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am looking for a pure Javascript/JQuery solution for Link Highlighting. It would highlight the link in such a way that if you were on the same page as the navigation link it would stand out amongst the others. The reason for the Javascript solution over css is due to an experiment on making a webpage through the use of heavy Javascript/JQuery code. I am not looking to integrate or add this to any site/code I am writing. I only want to be given proper examples to further my knowledge of Javascript/JQuery and to quench my curiosity.
Small example of a navigation bar that is on the page 'Example 3'.
http://jsfiddle.net/hPhzB/
Html:
<nav>
Example 1
Example 2
Example 3
Example 4
Example 5
</nav>
Short Story:
Using javascript make a navigation system that
Can figure out what page it is on
Link that page to the navigation link
Style that link so it stands out
you can use a regex in the class of the content container on a page (or the body element).
check out: http://fiddle.jshell.net/UeNdJ/
<ul>
<li id="m1">menu1</li>
<li id="m2">menu2</li>
<li id="m3">menu3</li>
</ul>
First of all, dont use js for things that you can do simply with css. css is much cheaper than js. but if you really want to do this with js, you can set css with js.
$('#m2').css('background-color','blue');
but again, this is not the elegant way of doing this. this makes me unhappy.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am new the css front-end programming, I am applying the css into my web pages, and using bootstrap, but I found that a sentences described as the title, I don't understand the meaning of "masthead pdng-stn1" and the meaning of "phone-box". I can't find the definition of them in the bootstrap.css and all of the css files in my folders, but they can't be deleted otherwise the web pages can't display properly, please give help, thanks a lot!
Welcome to StackOverflow! I would recommend browsing the How to Ask a Good Question documentation. That said, generally "classes" are just a way to group/categorize elements on a page and apply like-styles to them. pdng-stn1 is clearly a poorly thought out name, and whatever it means would have made more semantic sense, like pudding-stain1 or whatever. They're not necessarily related to Bootstrap in any way. masthead is often synonymous with header or page-top, something like that. You really just need to dive through the source code, or read the documentation that comes with whatever frameworks your website is using.
If you'd like you can read up on the basics of CSS Class Selectors. They're essentially entirely arbitrary and are chosen based on the current developer's needs and desires for structure, or for integration/semantic similarity with the current framework.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I am new to web programming and stumbled upon this tutorial:
http://tympanus.net/codrops/2012/12/31/how-to-create-a-simple-multi-item-slider/
My quick question: Is the Javascript used there all native or is it a weird mixture with jQuery?
I already know jQuery but don't know what the "init" and "$el" stuff for example means... Will I be able to understand the whole code when studying native Javascript?
Well the fact that "jQuery" is mentioned 6 times on the page you've linked to, I'm going to say yes. Yes it is.
For today’s tutorial we want to show you ... CSS animations and some jQuery.
Not to mention if you click to view the demo, then view the page's source you'll find:
<script src=".../jquery/1.8.3/jquery.min.js"></script>
If you're wanting to learn jQuery, check out http://try.jquery.com and http://learn.jquery.com.
the $ sign is used to reference JQuery
and init, well thats a function name. Given that you say you know JQuery and you ask this question i would recommend checking tutorials on JQuery and JavaScript and become familiar with both syntax
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
form is not working, I used HTML5 & bootstrap 3.0?
here i add the link of the site please checkout.
I cant figure-out it.
http://www.deliveryguys.in/html/index.html
It's usually best to post snippits of code that you think are malfunctioning but in this case I think you should invest in a spellchecker.
I went to
http://www.deliveryguys.in/html/index.html
And it seems to work fine.
Notice it's HTML instead of HMTL
Edit: OK now I see the real problem with your code
The form is underneath other HTML elements. You need to give your stylings z-indexes in order to control what is on top of what. I gave the form a z-index of 1000 and it worked fine. I suggest editing your css classes to include z-indexes to give you finer control than that.
Please note that your form action has been mapped to "#"
Kindly point the form action to the appropriate server page & it will start working.
Regards
SRIRAM NATARAJAN
(Chennai, Tamil Nadu, India)
(www.thesriram.co.in)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have this bug happening in my site where my menu drops down and instead of being render on top there is this one area that is under the table.
I am looking for an answer but am not sure exactly what is the bug called, or if it is a CSS, java script, or library problem. The menu is created using Kendo Ui and the table/Grid is created using JqxGrid. If you guys can help me identify the name of this behavior it will help me a lot in finding the solution. Or if you know the reason that is even better. Before I show code I would like to try to solve this on my own. Thank you.
It looks to me like an issue with your CSS. The row of the grid you have is at a higher z-index than your menu. In my experience the best thing to do is to explicitly (where possible) give your menu items z-indices higher than anything else you have on the page (or would want). eg. if your highest z-index is 100, use 1000 for the menu.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to use 2 different open source plugins for my website, a gallery and a calendar, both uses JQuery to work.
But when i put both of their javascript together in my website, it clashes and only one will be able to appear.
Is there any ways to specific if that javascript file just works for one DIV only? Or any work around to have both in my website.
Is there any ways to specific if that javascript file just works for one DIV only?
No, there is a single execution environment for a given HTML document. The only way to sandbox JavaScript is to put it in an iframe (even then, there are APIs that allow other documents to be affected)
Or any work around to have both in my website.
Edit the source of the respective scripts to change which elements they affect and to make them use the same version of jQuery and any other libraries they might depend on.