我有这个标记
<div id="wrapper">
<input type="file" id="file" accept="image/*" capture="camera">
<a href="#" id="capture">Submit Cleanup</a>
</div>
Run Code Online (Sandbox Code Playgroud)
和jQuery如下
jQuery(function($){
$('#capture').on('click', function(e){
e.preventDefault();
$('#file').trigger('click');
});
});
Run Code Online (Sandbox Code Playgroud)
该脚本在PC浏览器上按预期工作,但当我尝试移动设备时,相机不会提示.我也尝试过使用click(),但结果相同.
可能是什么问题呢?
假设我有这些标签:
<ul data-toggle="tooltip" data-title="hello world">
<li data-toggle="tooltip" data-title="content 1">content 1</li>
<li data-toggle="tooltip" data-title="content 2">content 2</li>
<li data-toggle="tooltip" data-title="content 3">content 3</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
如何将ul鼠标悬停在li标记上时防止显示工具提示?目前当我将鼠标悬停在li两个工具提示上时都显示出来.
我有以下型号.
class Training extends \Eloquent {
// Add your validation rules here
public static $rules = [
'name' => 'required',
'city' => 'required',
'province' => 'required',
'budget_year' => 'required|integer',
's_date' => 'required|date',
'e_date' => 'required|date'
];
// Don't forget to fill this array
protected $fillable = [
'name',
'city',
'province',
'budget_year',
's_date',
'e_date'
];
public function material(){
return $this->hasMany('Material');
}
public function budget(){
return $this->belongsToMany('Budget')->withPivot('amount');
}
public function budgetById($training_id){
$this->belongsToMany('Budget')->where('training_id', '=', $training_id)->get();
}
}
Run Code Online (Sandbox Code Playgroud)
当我使用调试budgetById方法时DB::getQueryLog,查询如下
select …Run Code Online (Sandbox Code Playgroud) 所以,在我的代码中,我有以下可能性:
<div class="price-box">
<p class="was-old-price">$PRICE$</p>
<p class="special-price">$PRICE$</p>
</div>
Run Code Online (Sandbox Code Playgroud)
或者
<div class="price-box">
<p class="old-price">$PRICE$</p>
<p class="special-price">$PRICE$</p>
</div>
Run Code Online (Sandbox Code Playgroud)
我想当.was-old-price被打印 insted 时.old-price,.special-price具有display:none属性。这可以使用 CSS 来实现吗?
假设我有一个名为的表comodity_group,其结构如下所示:
+----------+-------+
| group_id | name |
+----------+-------+
| 1 | Data1 |
+----------+-------+
| 2 | Data2 |
+----------+-------+
| 3 | data3 |
+----------+-------+
Run Code Online (Sandbox Code Playgroud)
我有以下查询
SELECT * FROM comodity_group WHERE name IN('data1','data2','data3')
Run Code Online (Sandbox Code Playgroud)
查询返回0结果,因为条件都是小写的(注意条件也是动态的,可以是Data1或daTa1等)
所以我想将条件和字段名称都设为小写,换句话说,不区分大小写。