$testStr = '<tr>
<td height="20"><a title="Замена кнопки Home" href="/V-iPhone-ne-rabotaet-knopka-Home">Замена кнопки HOME</a></td>
<td align="center"><span id="id169-iphone-5-home">1200</span></td>
<td align="center">от 30 минут</td>
<td align="center">3 месяца</td>
</tr>
<tr>
<td height="20"><a title="Ремонт кнопки блокировки" href="/Ne-rabotaet-knopka-vkliucheniia">Замена кнопки включения</a></td>
<td align="center"><span id="id166-iphone-5-power">1400</span></td>
<td align="center">от 30 минут</td>
<td align="center">3 месяца</td>
</tr>';
$regExpWrapper = "#<span(?:.*?)\"id(.*?)\-#si";
preg_match_all($regExpWrapper, $testStr, $matches);
print_r($matches);
<button class='change-color'>change color</button><br>"
<button class='remove'>remove</button>"
var $dialog = $("#dialog")
.dialog({
resizable: false
});
$('#dialog').parent().css({'z-index': '99999'});
.....
// If the touch interaction did not move, it should trigger a click
if (!this._touchMoved) {
// Simulate the click event
simulateMouseEvent(event, 'click');
}
....
.....
// If the touch interaction did not move, it should trigger a click
// if (!this._touchMoved) {
// Simulate the click event
simulateMouseEvent(event, 'click');
// }
// Unset the flag to allow other widgets to inherit the touch event
.....
<div class="textarea" contenteditable="true" spellcheck="true">Тестовая строка</div>
$('.textarea').html(
'<span class="mouseAnchor">' + $('.textarea').html() + '</span>'
);
$('.mouseAnchor').bind('click', function(event){alert('На мне щелкнули');});
<script type="text/javascript" src="http://localhost/script/js/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="http://localhost/script/js/MomentJS/moment-with-locales.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
var tarifs = new Array(100, 200, 300, 400, 500, 600, 700, 800);
$('.btn-info').bind('click', evalResult);
function evalResult()
{
var temp = $('.form-control1');
temp.css({'display': 'none'});
var payByMonth = tarifs[$('.form-control option:selected').val()];
var startDateInterval = moment($('#currentDay').val());
var endDateInteval = moment($('#targetDay').val());
var timeInterval = parseInt(startDateInterval.to(endDateInteval, true).split(' ')[0]) + 1;
var dayInCurrentMonth = moment($('#targetDay').val().substr(0, $('#targetDay').val().lastIndexOf('-')), "YYYY-MM").daysInMonth();
var payByDay = payByMonth / dayInCurrentMonth;
var totalAmount = timeInterval * payByDay - parseInt($('#currentBalance').val());
$('#sum').val(totalAmount.toFixed(2));
}
});
</script>
<tr>
<td><p class="text-right form-control-static" >До какого числа желают оплатить?</p></td>
<td>
<input class="form-control" id="lastDay" type="date" name="calendar" id="targetDay">
</td>
<tr>
<td><p class="text-right form-control-static">Тариф абонента:</p></td>
<td>
<select class="form-control" id="tarif">
<option value="0">Тариф "Мини"</option>
<option value="1">Тариф "Безлим 4"</option>
<option value="2">Тариф "Безлим 10"</option>
<option value="3">Тариф "Безлим 35"</option>
<option value="4">Тариф "Jump 5"</option>
<option value="5">Тариф "Jump 10"</option>
<option value="6">Тариф "Jump 35"</option>
<option value="7">Тариф "Jump 70"</option>
</select>
</td>
</tr>
document.querySelector('.ytp-time-display span:nth-child(1)').innerHTML
'one two three'.split(' ').reverse().join(' ')
<ul>
<li>Один Два Три</li>
<li>Четыре</li>
<li>1234567890</li>
</ul>
var list = $('ul li')
list.each(function(index, item)
{
currentItemText = $(item).html();
$('li:eq(' + index + ')').html(currentItemText.split('').reverse().join(''));
// console.log($(item).html());
});
$sourceContent = '<div style="margin-top: -18px;">
<nobr>
<b>18 / 25</b>
</nobr>
</div>';
$regExpWrapper = "#(?:<nobr>(?:.*)(?:<b>))(.*?)/(.*?)(?:</b>)#s";
preg_match($regExpWrapper, $sourceContent, $matches);
echo iconv("UTF-8", "CP866", $matches[1]." из ".$matches[2]);
$regExpWrapper = "#(?:\"wa-progress\")(?:.*?)(?:</div>(?:.*?)>(.*?)/(.*?)</div>)#s";
$cURL = curl_init();
curl_setopt ($cURL, CURLOPT_URL,'www.goldcs.ru');
curl_setopt ($cURL, CURLOPT_RETURNTRANSFER,1);
curl_setopt ($cURL, CURLOPT_SSL_VERIFYPEER, 0);
$cURLResult = curl_exec($cURL);
curl_close($cURL);
preg_match($regExpWrapper, $cURLResult, $matches);
echo iconv("UTF-8", "CP866", $matches[1]." из ".$matches[2]);