Tôi đang làm việc theo số site cho khách hàng có nội dung được gắn thẻ jquery.Làm cách nào để nhận được liên kết để mở một tab cụ thể trên một trang?
Liên kết đến đúng trang là đủ dễ dàng, nhưng thử thách là mở tab chính xác khi bạn đến đó. Trên cuộn trang về phía dưới cùng và nhấp vào biểu tượng Di chuyển biểu tượng (biểu tượng có xe tải). Thao tác này sẽ đưa bạn đến số move it page. Điều này hoạt động tốt, nhưng tôi muốn nó có thể mở tab Đặc biệt.
Đây là đoạn mã liên kết đến trang:
<li><a id="moveit" href="services_move_it.html">Move It</a></li>
tôi đã cố gắng này, nhưng nó không hoạt động một cách chính xác
<li><a id="moveit" href="services_move_it.html#specialty">Move It</a></li>
Đây là mã cho các tab trên trang đích:
<div id="specialty-content" class="content">
<p class="intro">Moving Simplified specializes in moving items such items as pool tables, pianos, antiques, and anything else you can throw at us.</p>
<div class="video-link">
<a href="#">Watch the Move It Specialty Videos Now.</a>
</div>
<p> Moving such items is more complicated than most would understand, and is an art form in itself. We take pride in making sure that your priceless possessions are delivered damage free. The employees sent to move your belongings are highly experienced in these types of items. They will always be well equipped to complete the move with the most up to date technology in the moving industry.</p><p> We will always pad and wrap each individual piece, as well as provide custom crates to ensure the safety of your pool table slate.</p>
<div class="msg">
<p><strong>Want to download the Move It Specialty guide?</strong> Go here <a href="#">now</a>.</p>
</div>
</div>
Đây là câu hỏi để vận hành các tab:
$(document).ready(function() {
/* this is for the tabbed content */
$("a.tab").click(function(evt) {
evt.preventDefault();
$(".active").removeClass("active");
$(this).addClass("active");
$(".content").slideUp();
var content_show = $(this).attr("id");
$("#" + content_show + '-content').slideDown();
});
Vì tôi sẽ cần thực hiện điều này trên nhiều combo/liên kết tab Tôi muốn tìm cách tiếp cận có hệ thống.
Cảm ơn bạn đã trợ giúp!
Cảm ơn bạn đã vượt qua điều này. Đây là chức năng chính xác mà tôi cần. – fmz
liên kết của bạn bị hỏng :( –