Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm having a real problem with target _blank. The website is this: http://www.l2herbal.com/ When I placed a link with target _blank in the menu ('Forum') if the user clicks on it, it opens in a new tab BUT the problem is that http://www.l2herbal.com/forum remains in the old address bar. I've checked all the js but found nothing.
Chrome, Mozilla, IE acting the same.
It's an issue with this script: http://www.l2herbal.com/js/scrollTo.min.js
Here is a code that changes window URL:
window.location.hash = d
You applied it to all menu links in http://www.l2herbal.com/js/main.js:
$('#nav-boxes a, .logo a, #nav a, #navmobile ul a').scrollTo({ duration: 'slow' });
Change #nav-boxes a selector to exclude forum url.
Inspecting html from your site I did found href="/forum"
Place a dot(.) before /forum in href to indicate forum in current(root) directory
Use
<a style="width: 16.6667%;" class="menu-5" href="./forum" target="_blank">
<div></div><span>Forum</span></a>
Instead of
<a style="width: 16.6667%;" class="menu-5" href="/forum" target="_new">
<div></div><span>Forum</span>
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to add text(which is not part of the link) beside a link. How should I align it beside the link?
For example,
text - link
I want to do it like that
Just type the text within the element, but not inside the link tag. Your link text will be inside a tag.
For example:
<div>Text link</div>
Try like this
<!DOCTYPE html>
<html>
<body>
<ul style="list-style-type:none;" >
<li>Google - <a href="https://www.google.com" >Link</a>
</ul>
</body>
</html>
Output :
Google - Link
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 6 years ago.
Improve this question
I need some help with html)
I have this:
When i press to another "button" (like pig) text in the centre must change to another.
So question: what i need to use to make it. Maybe you have some example.
As I understand, you can solve your question with this:
<html>
</body>
<script>
function changeText()
{
document.getElementById('MiddleText').innerHTML = 'New Text in the middle';
}
</script>
<p id='MiddleText'>Your text in the middle</p>
<input type='myButton' onclick='changeText()' value='Change Text'/>
</body>
</html>
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 8 years ago.
Improve this question
I am using Bootstrap and want to place a checkbox within a button, similar to what is done with Gmail to select all messages. I have looked at the Gmail CSS but have been unable to determine how they've done it.
Here is a simple example, made of DIVs with some CSS and a little jQuery to check the checkbox when the button is clicked:
jsFiddle demo
HTML:
<div id="container">
<div id="btnOuterDIV">
<div id="btnChkbox">
<input type="checkbox" id="btnCB" />
</div>
</div>
</div>
CSS:
#container {padding:50px;}
#btnOuterDIV{height:30px;width:80px;border:1px solid #ccc;border-radius:5px;}
#btnOuterDIV:hover{border-color:#888;cursor:pointer;}
#btnChkbox{height:15px;width:15px;padding-top:5px;padding-left:5px;}
jQuery:
$('#btnOuterDIV').click(function(){
alert('You clicked the button');
$('#btnCB').prop('checked',true);
});
Edit:
Button text (a label) added to the button: http://jsfiddle.net/crrojLho/2/
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
JSFIDDLE: http://jsfiddle.net/t9h6W/
<body style="margin:0 0 0 0;background-color: #f4f4f4;">
<div>
The JSFiddle has all the code.
</div>
</body
Everything seems to be fine, I don't understand why the Facebook Social Plugin isn't working? More-so, how would i reposition the social plug in inside the login form that I have present on the page? No Idea why it isn't working :/
It says,
Invalid App Id: Must be a number or numeric string representing the application id.
Open your browser console and you will see Javascript error.
To reposition the FB login button, you can place the code inside a div and control the div to position the box.
ie., put the fb embed code inside a div like this,
<div class="fb-login">
<fb:login-button show-faces="true" width="200" max-rows="1"></fb:login-button>
</div>
Now you can apply style to 'fb-login' class to position the fb button.
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'd like to know how I can have a link to an external page that is not visible to adblock users.
I have tried many things including giving it a div id="ad", and iframes. Is there maybe something I have missed?
Here is a very simple example. I display the GoogleAdsense logo outside of the screen. If the image has no height it was blocked -> there is a AdBlocker
<html>
<head>
<title>AdBlock Detector</title>
<script type="text/javascript">
//Is there a AdBlocker?
function isAdBlocker(){
var a = document.getElementById("adTest");
return a.offsetHeight==0;
}
//Hide all Links tagged with 'add="true"'
function protectLinks(){
if(isAdBlocker()){
var links = document.getElementsByTagName("a");
for(var i=0; i<links.length; i++)
if(links[i].getAttribute("ad"))
links[i].style.display="none";
}
}
</script>
</head>
<body onload="protectLinks()">
You can't see this link with enabled AdBlocker
<a ad="true" href="http://google.de">Link to Google</a>
<img id="adTest" style="position:absolute; left:-5000px" src="https://www.google.com/images/logos/adsense_logo_sm.png">
</body>
</html>
Insert the little Script and the "adTest" div in your Blog and give all links you want to protect a ad="true" attribute.
(And don't forgett to call the protectLinks() function after page is loaded.)