• Resolved chrishe

    (@chrishe)


    Using wp-members and NextGEN-Galleryview plugins.
    When the login widget is on the same webpage as a Gallery users cannot login, because every gallery transition removes the focus from the login widget while they are typing!
    Does anyone have a fix for this?
    (Galleryview plugin originally by Jack Anderson)
    Thanks
    Chris

    https://www.ads-software.com/plugins/wp-members/

Viewing 1 replies (of 1 total)
  • Thread Starter chrishe

    (@chrishe)

    OK, after a lot of messing around I have a simple solution ??
    I suggest NOT adding this within wp-members js file so that it does not get wiped on upgrades.
    So add the following to your theme custom .js file or put within script tags in a theme html file etc. as you choose!)
    You can of course ignore all comment lines ??

    /**
     * JS hack allows WordPress nextgen-galleryview2 and wp-members plugins (login widget etc.)
     * Also could solve problems with other inputs ( if we tweak code below) on a page where a slideshow is running!
    
     * Issue: in Chrome/IE/mobile (but not Firefox) the nextgen-galleryview2 slideshow animation
     * removes the focus from page inputs whilst user is typing!
    
     * This hack pauses the slideshow when user clicks/taps on #username or #password elements.
     * It does this by clicking the slideshow "Pause" control programmatically.
    
     * Enables the login widget, (from the excellent "wp-members" plugin, Author Chad Butler/RocketGeek ) to work
     * correctly when the web page also contains a slidshow gallery.
    
     * Note: We use click() not focus() becos the username input may be auto-focused when the page loads, which stops slideshow!
     * Note: If slideshow controls are not displayed it will not work!
     * Note: since wp-members login causes the page to be reloaded, no need to restart slideshow!
     *
     * author: Chris Hearn. 30-March-2014
     ***/
    
    jQuery(document).ready(function() {
    	/* NOTE: to stop slideshow on ANY/ALL inputs on the page, just use:
    	 * jQuery(":input").click( function() {  jQuery(".gv_navPause").click(); } );
    	*/
    
    	/* stop slideshow when (wp-members) either login or password inputs get a click (do both in case login is auto-filled) */
    
    	if ( jQuery("#username, #password") &&  jQuery(".gv_navPause") ) {  // these elements DO exist!
    		jQuery("#username, #password").click(function() { 	//when either get a click
    			jQuery(".gv_navPause").click();			// click the slideshow Pause
    			//	alert('gv_navPause'); 			// a test line. If our code is working we get an alert!
    		});
    	}
    });

Viewing 1 replies (of 1 total)
  • The topic ‘Galleryview plugin conflict’ is closed to new replies.