私のコードと私の問題は次のとおりです。
<script type="text/javascript">
$(document).ready(function() {
// this variable is used to set the dynamic elements
tagFlag = '';
$("#a1").click(function(event) {
event.preventDefault();
tagFlag = 'me'; // setting the element which I want to trigger later
});
$('#'+tagFlag).click(function(e) {
// do sthing here
});
});
</script>
</head>
<body>
<a href="">make the element</a>
<p id="me">some words here</p>
</body>
</html>
しかし、tagFlag を設定して「p」をクリックしても何も起こりません。
どうもありがとうございました!!