Response title
This is preview!
Test that #EmptyCartMessage does NOT have a style=display:none on itif( $(div #EmptyCartMessage).css("display") != 'none' ){
OR
if not ($(div #EmptyCartMessage).css("display") = 'none' ){
$(div #KeepShopping).css("display") == 'none'
}
$("span:contains('Check Out')").css("color", "purple"); (adapted from jQuery docs, this tests if span contains that phrase??)
actual generated span html looks like this:
<span class="btn btn-success"> Check Out </span>
it's the css button color I want to change...
Any suggestions?? I'm generally familiar with jQuery but not enough in-depth familiar with the proper code/syntax I need...
Thank you, Tom
// auto-wrap product image paragraphs 4/3/12 but not first paragraph
$('div#product-content p:gt(0)').each(function(index) {
$this = $(this).wrap('<div class="row"><div class="ten columns offset-by-two products">');
});
How do I change the code to only wrap the paragraph IF the paragraph contains an image??
Thank you, Tom
$('#text-content img').each(function(index) {Firefox keeps telling me I have an invalid assignment left-hand side in line 2.
if ($(this).css('float')="left")
{
alert($(this).css('float'));
$(this).next('#text-content img').css('margin-right','15px');
}
else
{
$(this).next('#text-content img').css('margin-left','15px');
}
});
$('#myCarousel img').each(function(index) {
alert ($(this).attr("title"));
if ($(this).attr("title").length > 83)
{
$('div.carousel-caption').css('height','3.2em');
}
else
{
$('div.carousel-caption').css('height','');
}
});
I want the current image's (paragraph really displayed below the img referenced by $(this) above) div.carousel-caption height changed if its title text is long, otherwise no height style injected.
jQuery(function($){Thank you, Tom
$('#carousel img').each(function(index) {
var imgTitle=$('#carousel img').title();
alert(imgTitle.length);
something that saves the tallest image's height attribute, but what?? value
}};
$("img:not(:#subsection)").each(function(index:)??
//jQuery(function($){
// $('#myCarousel img').each(function(index) {
// var imgWidth=$('#myCarousel img').width();
// alert(imgWidth);
to get the first image's width.
I've trained people to make all slideshow images the same width.
Thank you, Tom
After various struggle I have this code which works properly for my needs:
jQuery(function($){
$('#myCarousel img').each(function(index) {
var imgWidth=$('#myCarousel img').width();
alert(imgWidth);
$this = $(this).wrap('<div class="img-caption" style="width:' + imgWidth + 'px; float:left;" />');
$('<p>' + $this.attr("title") + '</p>').insertAfter($this);
});
});
How do I change it such that if the image does NOT have #myCarousel ID the 'float:left;' is not written in??
That is, for all images in the #myCarousel div, apply float left otherwise don't apply float left.
Quite new to jQuery, not at all a programmer. :(
Thank you, Tom
© 2013 jQuery Foundation
Sponsored by and others.