Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

I have style code in a .js file.. So how can i pull it out to a css file?-Solved

Aloittaja Hoochie Coochie Man, huhtikuu 30, 2008, 07:32:01 AP

« edellinen - seuraava »

Hoochie Coochie Man

Hi

I'm using two style file.. I mean I have two color in my forum.. (black and white)
So users have a quickchange alternative..
Like DilberMC Theme..

I can easily edit style files for each colors

But I'm stuck  :-[  Because I have .js file which includes style codes like color.. So how can i pull it out to a css file?

or

edit the .js file?


ex:
Lainaavar moduleEnter = '#FFFFFF';
var moduleLeave = '#1E1E1E';

if (IN WHITE STYLE) moduleLeave = '#E6E6E6';


Thank you..
İnadına SMF 1.1.X

niko

So you want to change color on mouse over? You can use hover pseudo class for that


html:

<div class="test">
Test
</div>

css:

test
{
border: 1px solid green;
}

test:hover
{
border: 1px solid black;
}


And fix for IE:

http://www.vladdy.net/Demos/IEPseudoClassesFix.html
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

Hoochie Coochie Man

Thanks but that's not what I want  :-[

I'm using mootools efect. so it's not that so simple..
and the codes are these..

Lainaavar moduleEnter = '#FFFFFF';
var moduleLeave = '#1E1E1E';

if (IN WHITE STYLE) moduleLeave = '#E6E6E6';

how can i pull it out to a css file? or what should I write in red area?  :-\
İnadına SMF 1.1.X

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Hoochie Coochie Man

#4
I don't know,
I ask you to what should I write for the red area?

I have two style file..
style.css (black one)
and
white-style.css
İnadına SMF 1.1.X

Hoochie Coochie Man

Sorry Guys, just forget what I said..

I'm just looking for this code:

Lainaaecho '
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/tool.js"></script>';
if (STYLE IS WHITE)
echo ';
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/white-tool.js"></script>';

What should I write for red area:-\
Thanks..
İnadına SMF 1.1.X

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Hoochie Coochie Man

#7
Let me tell you some thing..

Now..

I have two style.css file

1. style.css (black)
and
2. white-style.css (white)

I can easily change forum colors with buttons in two seconds..
Everythings fine now..

But I have a menu style, and its codes in a .js file not in a .css file..
So I couldn't change menu's color.

I have one .js file (for black color)
But I must use two .js file for each colors (black-white)

So I looking for this red area?
Lainaaecho '
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/tool.js"></script>';
if (STYLE IS WHITE)
echo ';
<script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/white-tool.js"></script>';

Thanks..




Edit: Thanks Dannii and Niko. I solved my problem.. Yağız helped me..

And the codes I'm looking for are these....

Lainaaecho '
    <script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/js/tool.js"></script>';
    if ($settings['theme_main_color'] == 'white')
    echo '
    <script language="javascript" type="text/javascript" src="', $settings['theme_url'], '/js/white-tools.js"></script>';
İnadına SMF 1.1.X

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Hoochie Coochie Man

İnadına SMF 1.1.X

Advertisement: