ورود

View Full Version : خلاصه نویسی در جی کوئری



mehditayebi
چهارشنبه 12 شهریور 1393, 21:44 عصر
سلام به همگی .
می خواستم ببینم خلاصه این دستور به چه صورت هستش ؟




jQuery(document).ready(function(){

// box1
jQuery(".responsive-design").on( "mouseover",function(){
jQuery(".web-design").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".seo").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});

});
jQuery(".responsive-design").on( "mouseout",function(){
jQuery(".web-design").css({
"filter":"alpha(opacity=100)",
"opacity":"1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".seo").css({
"filter":"alpha(opacity=1)",
"opacity":"100",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
});

//Box2
jQuery(".web-design").on( "mouseover",function(){
jQuery(".responsive-design").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".seo").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});

});
jQuery(".web-design").on( "mouseout",function(){
jQuery(".responsive-design").css({
"filter":"alpha(opacity=100)",
"opacity":"1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".seo").css({
"filter":"alpha(opacity=1)",
"opacity":"100",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
});

//Box3
jQuery(".seo").on( "mouseover",function(){
jQuery(".responsive-design").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".web-design").css({
"filter":"alpha(opacity=10)",
"opacity":"0.1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});

});
jQuery(".seo").on( "mouseout",function(){
jQuery(".responsive-design").css({
"filter":"alpha(opacity=100)",
"opacity":"1",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
jQuery(".web-design").css({
"filter":"alpha(opacity=1)",
"opacity":"100",
"-webkit-transition":" all 0.5s ease",
"-moz-transition":"all 0.5s ease",
"-o-transition":"all 0.5s ease",
"transition":"all 0.5s ease"
});
});

});



به زبان فارسی بخوام این دستور شرح بدم : من سه تا باکس دارم که می خوام وقتی موس بروی هر باکسی رفتش دو تای دیگه شفافیتشون به ده درصد برسه و وقتی موس از روی باکس خارج شدش شفافیت هر سه باکس به حالت اول برگرده .

نیاز به دو دستور سی.اس.اس دارم یکی : مربوط به Opacity و دیگری دستور transition برای وقفه در تغییر حالت .