Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] Category Protect Question



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Pozz

avatar
Punbb Rookie
Punbb Rookie
  • Description:
http://www.punbb.biz/t520-javascript-category-protect

how to apply the code into two categories?

( 1 and 2 )

I look Thanks.

  • Information:
Forum:http://technow.forumeiros.com/Version:PUNBB
Type:Request a codeTags:Category,Protect,Question

Powered by PunBB
Currently 0 users have thanked Pozz for this post:

2
Offline

  Shadow

avatar
Administrator
Administrator
Just copy the same code in the next row and change number from 1 to 2. For example:

Code:
[panda=js]  $(function() {
        if (document.getElementById('logout') == null) {
        var sCategory = '1';
        $('.main-content:eq(' + sCategory + ')').addClass('protect');
        }
        });

  $(function() {
        if (document.getElementById('logout') == null) {
        var sCategory = '2';
        $('.main-content:eq(' + sCategory + ')').addClass('protect');
        }
        });

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

3
Offline

  Pozz

avatar
Punbb Rookie
Punbb Rookie
Perfect! Smile

Powered by PunBB
Currently 0 users have thanked Pozz for this post:

4
Offline

  Shadow

avatar
Administrator
Administrator
[sucesso="Marked as Solved"]The question(s) in this topic have been answered and the owner has been able to solve the problem. Because of this, the topic has been marked as Solved.

If you have further questions, please open a new topic.[/sucesso]


Powered by PunBB
Currently 0 users have thanked Shadow for this post:

5
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum