|
|
|
|
![]() ![]() |
Apr 6 2006, 05:25 AM
Post
#11
|
|
|
PESTICIDAL MANIAC Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
Just noting M^E, that the first click on the title of the note is not registering correctly. After that it works as it should.
If you want me to fix it I can, I just didn't update the note at antilost because of the time and did not want to go through the CSS to fix it, but if you want me to I can. One thing for certain is I want to remove all id's from your note, as you can only use the named id once only in any document and cannot have ids that are the same which means multiple notes will conflict, that was probably why you thought of creating random generated id names, which in theory would work too, but more coding involved and harder to fix the CSS to reference it's styling. So I'm just saying use class as the alternative to style everything about it. No need to give it a name, if needs be comment above it and below it that states it's a notice for easier reading from source, but IPB HTML source is too messy for me to even bother looking through it. Cheers, MC |
|
|
|
Apr 6 2006, 05:29 AM
Post
#12
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Yep - I noticed that misclick too - but happens only first time you click the header.
I get what you mean - now there's no reason to have the ID's - since we're using the sibling iterator. Am off to make the changes Done updating.. The new code, stripped of the div id's looks like this: CODE <div class="notice"> <div class="header" onClick="java script:this.nextSibling.nextSibling.style.display = (this.nextSibling.nextSibling.style.display == 'block') ? 'none' : 'block';"> <div class="middlebar">Notice from {option}: </div> </div> <div class="messagebody">{content}</div> </div> I updated it on Anitlost too. |
|
|
|
Apr 6 2006, 08:18 AM
Post
#13
|
|
|
PESTICIDAL MANIAC Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
Make it look like this and you've solved the 1 click misread, when actually it works as intended if you say it like this:
At present this.nextSibling.nextSibling.style.display = NULL, we never set a style and we can't read user/browser defaults. So (shortening the code) display = (test if display == 'block' it returns NULL) ? if true display = 'none' : Well it was false/NULL or at least != to 'block' so display = 'block'; We've now set a value, display now equals block, so the second click results in true and then display = none; Understandable? I hope so, I didn't want to go too much into this. CODE <div class="notice"> <div class="header" onClick="java script:this.nextSibling.nextSibling.style.display = (this.nextSibling.nextSibling.style.display == 'block') ? 'none' : 'block';"> <div class="middlebar">Notice from {option}: </div> </div> <div class="messagebody" style="display:block;">{content}</div> </div> I have updated here, you can do antilost What I'm proposing to do is clean up the HTML and CSS, eliminate the over use of div blocks if possible and use more semantic like means of displaying it. Also requires renaming the class names, due to reason that they could conflict especially using "header" which is too common. Cheers, MC |
|
|
|
Apr 6 2006, 09:44 AM
Post
#14
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Cool - am all up for it. I think I'd posted the note files at Anti.. if not, I'll post them - so you can have a go at the CSS.
|
|
|
|
Apr 6 2006, 11:04 AM
Post
#15
|
|
|
PESTICIDAL MANIAC Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
Cool - am all up for it. I think I'd posted the note files at Anti.. if not, I'll post them - so you can have a go at the CSS. OK, well, while you were away I created this: http://mastercomputers.uni.cc/bbcode/notice.html (you may also notice in the parent directory bbcode I'm also working on a book/article type means, it's basically quickly done, with inline styling, but I will seperate everything and make it easier to make changes). and if you view the source, I have the seperation of CSS/Javascript and the HTML in quite a basic/simple look. I didn't use your background-image (I prefer png instead of jpg too, unless it's a photo) or rounded corners and kept it quite box shape looking. I'm sure anyone if they wanted to, could jazz this up more, all I ask though is keep it W3C valid, it's what I aim for in all my web work. Cheers, MC |
|
|
|
Apr 29 2006, 03:27 AM
Post
#16
|
|
|
PESTICIDAL MANIAC Group: Members Posts: 626 Joined: 1-September 04 From: Auckland, New Zealand Member No.: 27 |
Notice from mastercomputers:
I have updated my Notice BBCode site
Just would like to point out the site now, which has instructions to get it working under IPB (not tested though), also fixes to work with IE, except I need to work on alpha-transparency, which I may remove since it would require server-side scripting, which won't do for this, so maybe revert back to normal images without transparency, but makes changing the colour easy. The link is http://mastercomputers.uni.cc/bbcode/notice.html Cheers, MC |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 11th October 2008 - 04:38 AM |