I want to add several new tags/subpages/sub-contents (I don't know what it is called) like this one:
http://www.rle.mit.edu/gg/publications/#1456759349089-640f1dcb-938f
【publications】is a page in which there are 【2016】,【2015】,...
When I hit 2016, the relative contents show up.
How can I do this?
Thanks.
from looking at the demo you've given, you're talking about an accordian. Try this plugin https://wordpress.org/plugins/tabby-responsive-tabs
If you wanna do it yourselve, copy this into your file:
<script>
function pshow(id){
document.getElementById(id).style.display="block !important";
}
function phide(id){
document.getElementById(id).style.display="none !important";
}
</script>
Show p1
Hide p1
<p class="hide" id="p1">This is p1</p>
Add this under design> customize css
.hide{display:none !important;}
Related
I want to add Custom set of cursor on my website.
How can i add a set of Cursors in Website using css/html/js ?
So , Default mouse pointer is different, when i hover hyperlink its diff,,.. n so on.
I need help with css code.
I have the Set of Pointers including both .ani & .cur required for my site.
I have already tried :-
These codes in my style.css
body, a:hover {cursor: url(cursor/blue.cur), progress !important;}
Still no luck !
I have a master page and what I want is to assign a default custom cursor to the page and have all links use another custom cursor
Is this possible?
<script>
document.getElementsByTagName("body")[0].style.cursor = "url('cursor/blue.cur'), auto";
</script>
this must work IE 6+
With css you can do that:
body {cursor: URL(imageFileUrl);}
If you need more information read this.
EDIT: This worked for me: <body style="cursor: url('cursor.jpg'), default">
The imagen that I've used is a jpg 32x32.
As the title says,I haven't realy started creating the code because I need a little help in here.Im not good at javascript or jquery scripting,I just started learning about html so I only know the basics.Now,getting back on topic.
I want an iframe disapear as soon as it's clicked but as I said I just started scripting.Anyone has any idea ?
Here's how you can do this with plain old JavaScript. Note that clicking the page loaded inside the iframe may not call you event handler which is why I've added a border to this example (clicking the border will execute the event handler). You may need to overlay the iframe with another element and capture the click event on the overlaid element.
<iframe src="http://someurl" onclick="this.style.display = 'none'" style='border: solid 10px red'></iframe>
you can use CSS to do this, give your iframe an id for example call it "iframe_id" like this:- #iframe_id.click{ display:none;}
Edit: as per your comment.
To include jQuery, put the following in your HTML <head></head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
Then use this w3schools article to learn how to attach javascript to HTML.
In your Javascript, you can use jQuery like this:
// Run all of the following code when our document is loaded
$( document ).ready(function() {
// Setup an event handler. Says, when we click on an iframe, run this function
$("iframe").on("click",function(){
$(this).remove();//jQuery function to completely remove from DOM
/* OR */
$(this).css("display","none"); //jQuery function that completely hides in CSS
};
});
Since you said you're new to programming HTML, you will want to read and practice JS. Here's an introduction to JS and jQuery.
I have a page (http://www.gardensandhomesdirect.co.uk/newhomepage)
I want to make the center column (#content-column) 930px for this page only, which will eventually become the homepage.
The CMS used is NetSuite, and is notoriously difficult to work with.
What is the best way to do this? Is it possible with just CSS/HTML commands or JavaScript?
Since it's a CMS you probably cannot add markup easily so I'm thinking some jQuery would be a simple solution here...
$(function () {
var path = location.pathname.substring(1);
if (path) {
var regex = new RegExp('newhomepage$', 'gi');
if (regex.test(path)) $('#content-column').addClass('yourClass');
}
});
This should add "yourClass" to the element just on that page.
Then you can add to your external CSS...
.yourClass {
width: 930px !important;
}
I feel your pain
I have used Netsuite extensively and found )after many hours of hair pulling and expletives) that the best solution (for us) has been to create the home page and any unique landing pages as Hard coded Hosted pages (hosted on Netsuite) and reserve Netsuite's CMS system for item pages where you need the add to cart functionality.
Take it from me in the long run it'll save you hours of frustration :-)
Of course you can use Netsuite tags all over the place as long as you host the pages in your "site" folder
I have no experience with Netsuite so please take this as is..
I would try to add a custom style tag to the document like this:
<style>
#content-column{
width:930px !important;
}
</style>
If you only have access to the HTML of that page, then put an inline style attribute in the center column's HTML. Example:
<div id="content-column" style="width: 930px;">
Is it possible to make a link such that it brings up the REL of a topic,
for example if a link is
Click here
Is it possible to have a user link so when they go to the page it automatically opens the lightbox?
For example http://example.com/?rel=lightbox&src=picture.jpg
or something like that?
Yes, but no browsers include a lightbox, so you'd need to write or find code to make one of those as well.
Yes, it is possible. You may better use URLs like http://domain.com/#lightbox, and write a little script:
//jQuery sample
$(document).ready(function() {
if (location.hash == "#lightbox") {
//Just show your lightbox manually
}
});
you can do that with a bit of jQuery
$(a[rel=lightbox]).click(function(e) {
// open the lightbox with the link url inside
return false
});
How can show closeable in the top of the page like stackoverflow new answers.
im using asp.net
It's really pretty simple - there's a div, with a control in it (an anchor I imagine) with a click event bound to it which removes the parent item from the DOM. Something like this
<!-- html -->
<div id="warning"><a href="#" class='close'>[X]</a></div>
And then some event goodness:
$(document).ready(function() {
$('.close').bind('click', function(e) {
$(this).parent.remove();
});
});
and you're pretty much done. Add salt and CSS to taste.
Do you mean the notification bar? If so, there is a nice demo and code snippet here.
http://tympanus.net/codrops/2009/10/29/jbar-a-jquery-notification-plugin/
Stackoverflow uses Javascript with the JQuery library to create this.
Here are a few jQuery imlpementations of the effect you looking for:
Slide Toggle
Slide Down
Hide
Queue
You will have to build on these.