$(this).scroll(function() {
if ($(this).width() < 992 ) {
var offsetHeight = $(this).scrollTop();
if ( offsetHeight > 50 ) {
TweenMax.to( $('header'), 0.3, {css:{backgroundColor: '#fff'}, ease: Back.easeIn} );
}
else {
TweenMax.to( $('header'), 0.3, {css:{backgroundColor: 'transparent'}, ease: Back.easeIn} );
}
}
});
$(function() {
$(window).scroll(function() {
var scroll = $(window).scrollTop() + 90;
var currentArea = $("section").filter(function() {
return scroll <= $(this).offset().top + $(this).height();
});
$(".nav a").removeClass("selected");
$(".nav a[href=#" + currentArea.attr("id") + "]").addClass("selected");
if ($(window).scrollTop() > 100) {
$('nav').addClass("navScroll");
$('img.logo').addClass("logoScroll");
$('div.menu').addClass("menuScroll");
} else if ($(window).scrollTop() < 100 ) {
$('nav').removeClass("navScroll");
$('img.logo').removeClass("logoScroll");
$('div.menu').removeClass("menuScroll");
}
});
});
UPDATE PictureProduct
SET Picture =
(SELECT * FROM OPENROWSET(BULK N'C:\1.jpg', SINGLE_BLOB) AS image)
WHERE Id = 6
INSERT INTO PictureProduct (Id, IdProduct, Picture)
SELECT 8, 4, BulkColumn
FROM Openrowset( Bulk 'C:\2.jpeg', Single_Blob) as image
var data = db.Products.Include("Repositories");
var values = new List<ProductWithRepoDTO>();
foreach(var record in data)
{
var reposArray = record.Repositories.Select(x=>x.Name).ToArray();
var reposString = string.Join(",", reposArray);
values.Add(new ProductWithRepoDTO
{
Id = record.Id,
Name = record.Name,
Cound = record.Count,
Price = record.Price,
Repository = reposString
});
}
//дальше работать с values