mardi 5 mai 2015

Text inside slideshow not lining up correctly. See fiddle

Is there any possible way to get the text to not jump up and down? I can't use position: absolute. because it messes up the rest of my website. Please look at this fiddle: http://ift.tt/1cjSRFy

Here is the html:

<div id="rotating-item-wrapper">
<div class="rotating-item intro">Text 1</div>
<div class="rotating-item intro">Text 2</div>
<div class="rotating-item intro">Text 3</div>

<p class="slidermwtext"> Lorem ipsum dolor sit amet, 
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut. </p>

See fiddle for javascript and css.

Thanks!

Is there any way to get my "slashes" to be the same size as the Font

I am using a Gotham font, if you go to this website: http://fctrs.com and see the "//Value section header you will see that the "// is a larger height than the text.

I am using this CSS:

.section .subheading
{
    font-family: "Gotham Bold";
    font-size: 130px;
    color: #c12330;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-right: -12px; /* offset letter-spacing */
    /*line-height: 1em;*/
}


    .section .subheading.left-slashes:before
    {
        letter-spacing: -35px;
        margin-right: 30px;
        content: "//";
    }

I would like the "//" to be the same height as the "Value" text.

Should I consider this a Font issue? My "Gotham Bold" Font asset is delivering the "//" to be a different height than that of AlphaNumberic characters in the Font asset?

I am trying to emulate this PSD capture: enter image description here

I am tyring to fadeIn and fadeOut css background color with jquery ajax?

I am trying to fadeIn a background color in the beforeSend and fadeOut in the success with ajax. I don't know what I have done wrong. Help, please.

var data={
                              action: 'tag_user_update',
                                postSearchNonce : MyAjaxSearch.postSearchNonce,
                                                                tag : $(this).closest("a").text(),
                                                                users_id : $("#users_id").val()
                                                        }
                                                        $.ajax({
                                                                url: MyAjaxSearch.ajaxurl,
                                                                type:'POST',
                                                                cache: false,
                                                                data:data,
                                                    beforeSend: function() {
                                                                        $('.tag_link').animate({ backgroundColor:'yellow'},'slow');
                                                                                                          
                                                                                },
                                                                success: function(data){
                                                                          $('.tag_link').animate({ backgroundColor:'white'},'slow');
                                                                }
                                                                        });//ajax

Android Stock Browser - Not responding to class changes

For my web-page, things work fine on Android API level 21.

But when I test the same page against Android API level 18, some features do not work.

When I toggle class "check" on .div1 with javascript. The .div2 display is not updated.

Here is sample HTML and sample CSS

HTML

<div class="div1 check"></div>
<div class="div2"></div>

<div class="div1"></div>
<div class="div2"></div>

CSS .div2{ display: none;} .div1.check ~ .div2{ display: block;}

Again, this works fine in Android API level 21 but facing issues in Android API level 18.

Any suggestions?

Vertically align image in li tag without height

I'm trying to vertically align the shopping cart image and have it change on hover as well. I checked the other answers but they all seem involve changing the height.

JSFIDDLE http://ift.tt/1KKFnOs

.navlogo, .navlogo_strip {
z-index:99;  
}
.navlogo img {
width:120px;
margin:10px 10px 10px 10px;
}
.navlogo_strip img {
width:50px;
margin:10px 10px 10px 10px;
}

.floatleft {
float:none;    
}
.floatright {
float:none;    
}

.nav_container ul li {
display: inline-block;
text-align: center;  
line-height:90px;
}

.nav_container ul li a {
padding:50px 30px 50px 30px;
margin:0px;
cursor:pointer;
}

.nav_container ul {
/*  margin-top:15px; */
margin-left:30px;
margin-top:0px;
}

.nav_container {
 text-align: center;
 width:100%;
 font-size:16px;  
 letter-spacing: -1px; 
}
.nav_container ul li:hover {
/* not needed background-color:#08298A; */
}

.nav_container ul li:hover a {
 color:#fff;
 background-color:#08298A;
}
header {
width:100%; 
margin: auto;
min-width:420px;
/* 0 0 8px rgba(0,0,0,0.1)*/
}

HTML

        <div class="navlogo floatleft">
           <a href="http://localhost/auction/"><img src="logo.png" /></a>
        </div>


      <div class="desktopnav">
          <div class="floatleft">

          <div class="nav_container">
              <ul>
                  <li><a href="">Browse</a></li><li><a href="">Sell</a></li>
              </ul>
          </div>

        </div>

       <div class="floatright">

          <div class="nav_container">
              <ul>
                  <li><a href=""><img src="http://ift.tt/1KKFnhg" /></a></li><!-- <li><a href="">Profile</a></li> --><li><a href="">Sign out</a></li>
              </ul>
          </div>

          </div>
        </div>
       <div style="clear:both;"></div>
  </header>

multiple 360 sliders by end of wensday

PLEASE HELP OR TELL ME IF THIS IS POSSIBLE BY ENSDAY NIGHT. The spinning and everything works it just wont go where i want or reload when its re-selected.I want the 360 image sequence to be displayed at the bottom in the caption div, but i cant get it in there. Also i want the 360 image sequences to load only for each still image above the caption that corresponds to each 360. i dont know how to link everything properly in jfiddle but the code is there if you think you can help.

$(document).ready(function(){

$('.carousel_data .carousel_item').each(function(){

    $('#carousel').append($(this).find('.image').html() );

});
createCarousel();
showCaption();
});

//custom function for roundabout called createCarousel
function createCarousel(){

$('div#carousel').roundabout({
    childSelector: 'img',
    startingChild: window.startingItem,
    tilt: -11.5,
    minOpacity: 7,
    minScale: .3,
    duration: 1200,
    clickToFocus: true,
    clickToFocusCallback: showCaption
});
createCustomButtons ()
}

//custom function to wire next & prev buttons to roundabout carousel
function createCustomButtons (){

$('.nextItem').click(function(){
    hideCaption();
    $('div#carousel').roundabout('animateToNextChild', showCaption);
});
$('.prevItem').click(function(){
    hideCaption();
    $('div#carousel').roundabout('animateToPreviousChild', showCaption);
});
$('div#carousel img').click(function(){
    hideCaption();
});
}

//custom function to showCaption
function showCaption(){
var childInFocus = $('div#carousel').data('roundabout').childInFocus;
var setCaption = $('.carousel_data .carousel_item            .caption:eq('+childInFocus+')').html();
$('#captions').html(setCaption);
var newHeight = $('#captions').height()+'px';
$('.caption_container').animate({'height':newHeight},500,function(){
    $('#captions').animate({'opacity':1},150);
});
}
function hideCaption(){
$('#captions').animate({'opacity':0},250);
}

http://ift.tt/1cjSScH

Chaining jquery keydown event

I am trying to create a drop down like functionality where a div is shown once somebody starts typing in the input box. I am able to attach mouse click event on the individual elements to select them. But I am not able to select them via pressing enter.

HTML

<input type="text" class="input" name="example" id="example" placeholder="example..." autocomplete="off" list="examplelist" />

<div class="autofill">
    <ul class="autocomplete">
        <li class="autocomplete-list">John Doe (San Jose, CA)</li>
        <li class="autocomplete-list">Jane Doe (San Francisco, CA)</li>
        <li class="autocomplete-list">John Jane (San Carlos, CA)</li>
    </ul>
</div>

JQuery

$(document).ready(function () {
var $listItems = $('li.autocomplete-list'),
    $div = $('div.autofill'),
    $input = $('#example');

$div.hide();

$('input#example').on('keydown', function (e) {
    var key = e.keyCode,
        $selected = $listItems.filter('.selected'),
        $current;

    $div.show();

    if (key != 40 && key != 38) return;

    $listItems.removeClass('selected');

    if (key == 40) { // Down key
        if (!$selected.length || $selected.is(':last-child')) {
            $current = $listItems.eq(0);
        } else {
            $current = $selected.next();
        }
    } else if (key == 38) { // Up key
        if (!$selected.length || $selected.is(':first-child')) {
            $current = $listItems.last();
        } else {
            $current = $selected.prev();
        }
    }

    $current.addClass('selected');

    // When I press enter after selecting the li element
    // Does not work :(
    $current.on('keypress keydown keyup', 'li', function (event) {
        if (event.keyCode == 13) {
            var value = $(this).text().split('(')[0].trim();
            $input.val(value) ;
            $div.hide();
        }
    });
});


// If somebody clicks on the li item
$('li.autocomplete-list').on('click', function (e) {
    var value = $(this).text().split('(')[0].trim();
    $input.val(value);
    $div.hide();
});

// change color on hover
$('li.autocomplete-list').hover(
    function(){ $(this).addClass('hover') },
    function(){ $(this).removeClass('hover') }
);

// When I press enter after selecting the li element
// Does not work :( 

$('li.autocomplete-list').on('keypress keydown keyup', 'li', function (event) {
    if (event.keyCode == 13) {
        var value = $(this).text().split('(')[0].trim();
        $input.val(value) ;
        $div.hide();
    }
  });
});

How can I select a particular li element and then take its value when press enter? Here is the JSFiddle