我有一个代码,我需要创建一个图像的href链接。使用以下屏幕截图
我试过这样的事情:$(document).ready(function() {
var link = $(".car-image").find('li:first').find('a').attr('href');
var appendtoimg = $('.car-image').closest('.img-responsive') - here i am stuck as i need to add an onclick event so it can work same as like <a> tag
});
答案 0 :(得分:0)
如果你正在使用jquery,你可以添加一个click事件监听器。
#pragma once
#ifdef QT_CORE_LIB
# include <QtCore>
#endif
#ifdef QT_CONCURRENT_LIB
# include <QtConcurrent>
#endif
#ifdef QT_GUI_LIB
# include <QtGui>
#endif
#ifdef QT_WIDGETS_LIB
# include <QtWidgets>
#endif
#ifdef QT_MULTIMEDIA_LIB
# include <QtMultimedia>
#endif
#ifdef QT_NETWORK_LIB
# include <QtNetwork>
#endif
#ifdef QT_XML_LIB
# include <QtXml>
#endif
#ifdef QT_QML_LIB
# include <QtQml>
#endif
#ifdef QT_QUICK_LIB
# include <QtQuick>
#endif
#ifdef QT_SQL_LIB
# include <QtSql>
#endif
#ifdef QT_PRINTSUPPORT_LIB
# include <QtPrintSupport>
#endif