/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(function() { $('div[dtype="suit18"]').mouseover( function() { $(this).toggleClass("show_on"); var piaofuContainer = $(this).find(".show_piaofu"); $(piaofuContainer).width($(this).width()); $(piaofuContainer).height($(this).height()); $(piaofuContainer).show(); }); $('div[dtype="suit18"]').mouseout( function() { $(this).toggleClass("show_on"); $(this).find(".show_piaofu").hide(); }); $('div[dtype="suit18"]').click( function() { var url = $(this).find("a[atype='imglink']").attr("href"); window.open(url); // var form = $("<form action=\"" + url + "\" method=\"post\" target=\"_blank\"></form>"); // $("body").append(form); // form.submit(); // form.remove(); }); })