Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-06-21 16:31:09

Anatoly
Guest

Coding questions in website based languages

Stackoverflow lets you onyl ask some questions in a week, lets change it!

first question

How to make spoiler in JS, help me please making one!

#2 2016-06-21 16:45:35, last edited by Koya (2016-06-22 16:37:33)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Coding questions in website based languages

http://codepen.io/OfficialAntarctica/pen/gMLPpy/ (I am using the SCSS pre-processor, click 'View Compiled' for CSS)

Gnsk4a.gif

There are 2 type I can think of, one which shows on hover (like on Reddit) and another that you click to show (like the one on the forums)

For type 1 it doesn't require any javascript:
HTML
<div><div>Type 1:</div><spoiler>Someone dies in GOT</spoiler></div>
CSS
spoiler {
  background-color: #000; /*Same colour as text*/
}
spoiler:hover { /*When you hover over the element with your cursor*/
  background-color: transparent; /*Hides the obscuring colour*/
}
For type 2 it is easiest to use a little bit of javascript for clicks:
HTML
<spoiler type="dropdown"><div class="title">Spoiler Title</div><div class="body">Something very very frightning</div></spoiler>
CSS
body spoiler[type="dropdown"] {
  display: block; /*The spoiler to not be in line with text and take up the whole width permitted by the parent*/
  border: 1px solid #AAB2BD; /*Just so you know what the spoiler contains - I haven't added more styling than necessary*/
}
body spoiler[type="dropdown"] > .title {
  cursor: pointer; /*To show that you can click to open*/
}
body spoiler[type="dropdown"] > .title:before {
  content: '▼'; /*This is displayed before the title and shows it expands downwards*/
}
body spoiler[type="dropdown"] .body {
  display: none; /*Hides the text when closed*/
}
body spoiler[type="dropdown"].open > .title:before {
  content: '▲'; /*Shows the spoiler can close, it replaces the down arrow*/
}
body spoiler[type="dropdown"].open .body {
  display: initial; /*Show text*/
}

I'm using jQuery because there's no need to fiddle around with something simple like this

JavaScript/jQuery
$("spoiler >.title").click(function(){ /*When an object with the class "title" and is a direct child of a spoiler element then the function will activate*/
   $(this).parent().toggleClass("open"); /*If the parent of the clicked object does not have the class "open" it will be given it and if it does have it then it will be removed*/
});

Edit: added some styling to make it less gross


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by: (2)

#3 2016-06-22 16:32:26, last edited by Anatoly (2016-06-22 16:32:35)

Anatoly
Guest

Re: Coding questions in website based languages

As far as i know you can't create tags in html, spoiler isn't existing actually

#4 2016-06-22 16:35:02, last edited by Koya (2016-06-22 16:36:28)

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Coding questions in website based languages

AnatolyEE wrote:

As far as i know you can' create tags in html, spoiler isn't existing actually

With HTML5 you can make any tag, just by default it has the same styling as a span tag (inline).

<thisisfine></thisisfine>

If you look at the CSS I have styled it there, look in my first post.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#5 2016-06-22 16:39:39

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Coding questions in website based languages

Different55 wrote:

It's not valid but technically nothing's stopping you from doing it.

It is valid however, have to be careful about future-proofing but I can say for certainty that '<spoiler>' will not become a w3 html element.

It's a part of HTML5 that this is valid.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#6 2016-06-23 18:03:05, last edited by Anatoly (2016-06-23 18:03:19)

Anatoly
Guest

Re: Coding questions in website based languages

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

#7 2016-06-23 23:51:29, last edited by capasha (2016-06-23 23:52:29)

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Coding questions in website based languages

AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

Offline

Wooted by:

#8 2016-06-23 23:59:48

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Coding questions in website based languages

We are here to help with general web-based programming but nothing specific like you are asking for; while I'm happy to help with any HTML, CSS and JavaScript for "gadgets", nothing that requires specialised knowledge.


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

#9 2016-06-24 16:52:06

Anatoly
Guest

Re: Coding questions in website based languages

capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

#10 2016-06-24 16:53:21

Koya
Fabulous Member
From: The island with those Brits
Joined: 2015-02-18
Posts: 6,310

Re: Coding questions in website based languages

AnatolyEE wrote:
capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

Try a different forum service and don't get banned...


Po9cnQh.png

PLNQVL8.png
Thank you eleizibeth ^

1SYOldu.png

I stack my signatures rather than delete them so I don't lose them
giphy.gif

WfSi4mm.png

Offline

Wooted by:

#11 2016-06-24 16:53:30

Kirby
Member
Joined: 2015-04-04
Posts: 4,311

Re: Coding questions in website based languages

AnatolyEE wrote:
capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

jesus christ what did you do

Offline

Wooted by:

#12 2016-06-24 17:05:17

Anatoly
Guest

Re: Coding questions in website based languages

If going trough your projects Koya, this can be forund. - Bombot all palyer list.

Kirby wrote:
AnatolyEE wrote:
capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

jesus christ what did you do

i don't know, really.

#13 2016-06-24 17:33:29

Anatoly
Guest

Re: Coding questions in website based languages

#14 2016-06-24 20:22:02

sthegreat
Member
Joined: 2015-04-25
Posts: 409

Re: Coding questions in website based languages

AnatolyEE wrote:

If going trough your projects Koya, this can be forund. - Bombot all palyer list.

Kirby wrote:
AnatolyEE wrote:
capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

jesus christ what did you do

i don't know, really.

vpn?


user.php?id=sthegreat

Offline

#15 2016-06-24 20:24:34

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Coding questions in website based languages

AnatolyEE wrote:
capasha wrote:
AnatolyEE wrote:

OK, please someone explain me how to code javascript plugins

I want them for ProBoards

Why can't you use their forum and ask there instead?
I don't really see a reason that I need to learn their Javascript API. Just to "help" you.

I am banned on their support forum. (permament + IP banned)

Didn't know you could be permament banned. But I'm not going to tell how to bypass.
Because I don't want you to make new accounts here because you get banned every week or so.

Offline

#16 2016-07-08 18:16:02

Anatoly
Guest

Re: Coding questions in website based languages

option[color] {
  color:attr(color);
}

I am trying to get the color attribute and make it color

<option> is a part of the <select> box. How to fix?

#17 2016-07-09 16:44:11

Anatoly
Guest

Re: Coding questions in website based languages

Reason bumping: Not answered and fallen

AnatolyEE wrote:
option[color] {
  color:attr(color);
}

I am trying to get the color attribute and make it color

<option> is a part of the <select> box. How to fix?

#18 2016-07-09 21:45:07

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Coding questions in website based languages

Doesn't google work for you? Most times google have the result for me. Why doesn't it work for you?

Offline

Wooted by:

#19 2016-07-10 10:41:30

Anatoly
Guest

Re: Coding questions in website based languages

capasha wrote:

Doesn't google work for you? Most times google have the result for me. Why doesn't it work for you?

1) I didn't said that it doesn't work. It works!

2) I didn't said that i use it. (But, I use.)

But: I already found the answer //forums.everybodyedits.com/img/smilies/smile

#20 2016-07-15 11:55:49

Anatoly
Guest

Re: Coding questions in website based languages

#21 2016-07-15 13:02:19

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Coding questions in website based languages

I don't know anything about SCSS. But why would you use a function inside a function?

Offline

#22 2016-07-15 13:04:57

Anatoly
Guest

Re: Coding questions in website based languages

capasha in normal css it would be

obj1 obj2 {
/* acess to attribute from obj1 not possible, obj2 possible */
}

#23 2016-07-15 13:23:53

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: Coding questions in website based languages

Can't even find a tutorial about SCSS. Why do you need it anyway?

Offline

#24 2016-07-15 13:39:09

Anatoly
Guest

Re: Coding questions in website based languages

capasha wrote:

Can't even find a tutorial about SCSS. Why do you need it anyway?

Normal css:

AnatolyEE wrote:

capasha in normal css it would be

obj1 obj2 {
/* acess to attribute from obj1 not possible, obj2 possible */
}

#25 2016-08-22 21:20:03

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,658

Re: Coding questions in website based languages

I own a FQDN and I wish I could setup a mail server. Does somebody know how?
P.S. The machine is running Raspbian as OS(a Debian but for arm processors). I tried Postfix and I managed to make it work locally. However real mail servers(Yahoo, Gmail etc.) are refusing my connections(? as it says in the log files).
Side-note: My ISP is currently blocking port 25 but I think Yahoo and Gmail also accepts connections on ports 465 and 587, right?


Everybody edits, but some edit more than others

Offline

Koya1473178145622064

Board footer

Powered by FluxBB

[ Started around 1739081399.5972 - Generated in 0.091 seconds, 12 queries executed - Memory usage: 1.81 MiB (Peak: 2.08 MiB) ]