inherit
162752
0
Apr 19, 2024 11:31:08 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jun 20, 2013 14:30:08 GMT -8
Hi Everyone, Would it be possible to add a class to all .container classes so that they can be targeted/ignored. To explain more.... The majority of .container classes have a second class except for a few such as: which has the HTML : <div class="container"> <div class="title-bar"> where as other .container classes have a class that specify which container they are such as : <div class="container boards"> <div class="title-bar bbcode"> ================================================ The reason for this : There are now quite a few popular plugins that are using .container and .title-bar so plugins that I have written are conflicting with them. Having the extra class in the default HTML means that they can be targeted/ignored by using $('.container').not("[class='container']") Or similar. (not the way I'd want to write the plugin but there are lots of people already using the .container class) This also seems to be standardising the default way .container is used by having a description class (even if it doesn't do anything). Thanks, Pebble.
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Jun 20, 2013 14:36:50 GMT -8
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jun 20, 2013 15:03:38 GMT -8
Can you give me an example of where it's conflicting? I'm struggling to come up with a place where adding a second class wouldn't still require one or both plugins to use a different selector anyway.
|
|
inherit
162752
0
Apr 19, 2024 11:31:08 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jun 20, 2013 15:28:43 GMT -8
Can you give me an example of where it's conflicting? I'm struggling to come up with a place where adding a second class wouldn't still require one or both plugins to use a different selector anyway. Hi Tim Camara, I'm assuming you can get into the plugin at my test site. http://pebbleplugins.proboards.com One plugin is head, base & side images (plus other stuff) When i wrote the plugin for Head base side images (it also moves the title bar into the head image and a couple of other things) it worked/works fine on a default forum. It targeted the .container class. I've given the code to test to 6 or 7 people but it conflicts with codes such as the side bar redux plugin and the PBN admin plugin (& others) as they use the .container and .title-bar classes which are inserted via the headers and footers in the plugin (hence moving the plugin up or down doesn't make any difference as the code is executed later via document.ready) The workaround was to target .container as long as it contained another class. (not wanted but there seems no other option) I've commented some of the code as a workaround. I understand what you mean but it seems easier (to me ) to add a second description class to the 'saved changes' .container and others I can't think of at the moment.... rather than asking multiple plugin authors to amend their plugin. So for the title-bar I've changed it to /* Title Bar into top div for sidebar redux and PB admin workaround*/ $('.tbstart').each(function(index){ $('.Hholder').eq(index).append($(this).find('.title-bar')); });
/* $('.title-bar').each(function( index ) { $('.Hholder').eq(index).append(this); }); */ EDIT: Just realised the above is a work around but not the problem I'm talking about, but it gives an example of conflicts with other plugins using the default classes. And the .container as in the previous post so it only executes on .container with a description class. Cheers, Pebble. Another EDIT: Basically, what I'm trying to say is that if all the default .container classes had a description class then they could be targeted. As time goes on then I can see that more and more plugins will be adding .container classes etc and conflicts are going to increase. Extra edit: An example of the plugin conlicting with the PBN Admin menu can be seen here : iodv5beta.freemessageboards.com/ An empty surround box is created as the PBN plugin adds a .container in the plugin header
|
|
inherit
162752
0
Apr 19, 2024 11:31:08 GMT -8
Pebble
Where it all does or doesn't happen!
1,437
January 2011
pebbleleague
|
Post by Pebble on Jun 21, 2013 8:00:39 GMT -8
Resolved: I coded around the problem.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Jun 21, 2013 8:12:08 GMT -8
Well, I'm afraid I don't really have the time to go hunting around for all instances of .container, but if you give me a list, I can look into getting them added in.
|
|