Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Adam Silverstein

    (@adamsilverstein)

    you bet – i can fix that! i should have made those css selectors more specific!

    can you tell me the specific class thats conflicting and also what your plugin is so i can test? also: you might be able to work around this with a more specific selector to override mine (until i get my patched version up).

    Thread Starter XTREEMMAK

    (@xtreemmak)

    Thanks for the quick response!

    I made the temporary changes for now to fix things, but the conflict happens here. I changed “selected” to “selectedd” with two d’s:

    <script type="text/javascript">
    	jQuery( function() {
    		jQuery( 'form#uas_options_form #uas_user_select' ).change( function() {
    				jQuery( 'form#uas_options_form' ).submit();
    			} )
    	} );
    	jQuery( document ).ready( function () {
    		jQuery( 'div.submenuinner' ).slideUp( 'fast' ).hide();
    		//TO-DO: makes these submenu openings persist, save state in cookies?
    		jQuery( '.submenu' ).click( function() {
    			inner=jQuery( this ).next( '.submenuinner' );
    			if ( jQuery( inner ).is( ":hidden" ) ) {
    				jQuery( inner ).show().slideDown( 'fast' );
    				jQuery( this ).removeClass( 'unselected' ).addClass( 'selectedd' );
    				jQuery( this ).children( 'a' ).text( '<?php esc_html_e( 'Hide submenus', 'user_admin_simplifier' )?>' );
    			} else {
    				jQuery( inner ).slideUp( 'fast' ).hide();
    				jQuery( this ).removeClass( 'selectedd' ).addClass( 'unselected' );
    				jQuery( this ).children( 'a' ).text( '<?php esc_html_e( 'Show submenus', 'user_admin_simplifier' )?>' );
    
    			}
    	} );
    } );
    </script>
    <?php
    }
    	function uas_admin_css() {
    ?>
    <style type="text/css">
    
    	.unselected {
    		background-image:url( <?php echo ( plugins_url( 'images/plus15.png', __FILE__ ) ); ?> );
    	}
    
    	.selectedd {
    		background-image:url( <?php echo ( plugins_url( 'images/minus15.png', __FILE__ ) ); ?> );
    	}

    The plugin the class conflicts with is AMR Users inside each list. However, I tested that if anything else is using a .selected class within it, this class will apply as well to the background. To test, I used chrome and injected a list item randomly within the body with the selected class applied to it, and sure enough it did the same thing.

    Plugin Author Adam Silverstein

    (@adamsilverstein)

    Thanks for your suggestion. I reworked the select/unselect classes with a uas- prefix to keep them from conflicting. Please review and let me know if this fixes your issue.

    Plugin Author Adam Silverstein

    (@adamsilverstein)

    Marking as resolved, I believe this is fixed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘List Item Selected Class Conflict’ is closed to new replies.