snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#132125

Text only

Mobile App Development, iPhone Application Development Company AgileInfoways.com

1
2
3
4
5
Agile Infoways is a leading mobile app development company with over 600 apps built on iPhone, iPad and Android. Get free mobile app development quotes by http://www.agileinfoways.com/contact-us 

Our mobile application development services help businesses to mobilize their ... With a yearly rise in demand for Iphone apps, our developers and designers.

Find the feasible solutions for your business needs from a quality iPhone application development company who handle small to large projects.
https://snipt.net/embed/503bf95dc6b3e2d30771709de3c995e2/
https://snipt.net/raw/503bf95dc6b3e2d30771709de3c995e2/
503bf95dc6b3e2d30771709de3c995e2
text
Text only
5
2014-04-23T06:31:46
True
True
Apr 23, 2014 at 03:11 AM
/api/public/snipt/132125/
mobile-app-development-iphone-application-development-company-agileinfowayscom
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Agile Infoways is a leading mobile app development company with over 600 apps built on iPhone, iPad and Android. Get free mobile app development quotes by http://www.agileinfoways.com/contact-us </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Our mobile application development services help businesses to mobilize their ... With a yearly rise in demand for Iphone apps, our developers and designers. </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Find the feasible solutions for your business needs from a quality iPhone application development company who handle small to large projects. </span></pre></div> </td></tr></table>
"hire wordpress", agileinfoways.com, as3, bash, c++, css, django, drupal, git, html, java, javascript, jquery, js, linux, mysql, php, python, ruby, sql, wordpress
#126750

JavaScript

replace A HREF to SPAN

1
2
3
$('.head-recall').each(function () {
	$(this).replaceWith('<span>' + $(this).html() + '</span>');
});
https://snipt.net/embed/365826b2618249f8163f4b9d7bef8984/
https://snipt.net/raw/365826b2618249f8163f4b9d7bef8984/
365826b2618249f8163f4b9d7bef8984
js
JavaScript
3
2014-04-22T08:25:21
True
False
Apr 02, 2014 at 09:26 AM
/api/public/snipt/126750/
replace-a-href-to-span
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;.head-recall&#39;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">replaceWith</span><span class="p">(</span><span class="s1">&#39;&lt;span&gt;&#39;</span> <span class="o">+</span> <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">html</span><span class="p">()</span> <span class="o">+</span> <span class="s1">&#39;&lt;/span&gt;&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
javascript, js
#122560

JavaScript

Test if href points image

1
2
3
4
if($(this).attr('href').indexOf('.jpg') > 0) // or any other extension
{
    //do what you want
}
https://snipt.net/embed/6b6e76de0f8d48d7e980f025b5f0f153/
https://snipt.net/raw/6b6e76de0f8d48d7e980f025b5f0f153/
6b6e76de0f8d48d7e980f025b5f0f153
js
JavaScript
4
2014-04-18T23:46:29
True
False
Mar 17, 2014 at 01:11 PM
/api/public/snipt/122560/
test-if-href-points-image
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="k">if</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;href&#39;</span><span class="p">).</span><span class="nx">indexOf</span><span class="p">(</span><span class="s1">&#39;.jpg&#39;</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">// or any other extension</span> </span><span id="L-2"><a name="L-2"></a><span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="c1">//do what you want</span> </span><span id="L-4"><a name="L-4"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
check, href, image, img, javascript, jpeg, jpg, jquery, js, test
#114964

JavaScript

Detect animation end jQuery/CSS

1
2
3
4
5
el.one('webkitAnimationEnd oanimationend msAnimationEnd animationend',   
function(e) {
    // code to execute after animation ends    
    myBox.removeClass('change-size');
});
https://snipt.net/embed/b71bacffabc246414df93af4df6860dc/
https://snipt.net/raw/b71bacffabc246414df93af4df6860dc/
b71bacffabc246414df93af4df6860dc
js
JavaScript
5
2014-04-19T10:12:41
True
False
/api/public/snipt/114964/
detect-animation-end-jquerycss
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nx">el</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="s1">&#39;webkitAnimationEnd oanimationend msAnimationEnd animationend&#39;</span><span class="p">,</span> </span><span id="L-2"><a name="L-2"></a><span class="kd">function</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="c1">// code to execute after animation ends </span> </span><span id="L-4"><a name="L-4"></a> <span class="nx">myBox</span><span class="p">.</span><span class="nx">removeClass</span><span class="p">(</span><span class="s1">&#39;change-size&#39;</span><span class="p">);</span> </span><span id="L-5"><a name="L-5"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
css, jquery, js
#114762

Text only

JavaScript iFrame Buster

1
2
3
4
5
6
7
/*
Oftentimes you want to make sure your site isn't being IFRAME'd.  Sometimes it's for security reasons, other times it's so your site's content isn't being skimmed else, and other times it's...oh, who cares, you just want to do it.  Here's a short way to escape frames:
*/

if (top.location != self.location) {
    top.location = self.location.href;
}
https://snipt.net/embed/ec92d1593c098837461fbc10ed5230fe/
https://snipt.net/raw/ec92d1593c098837461fbc10ed5230fe/
ec92d1593c098837461fbc10ed5230fe
text
Text only
7
2014-04-21T05:48:02
True
False
Feb 18, 2014 at 10:11 AM
/api/public/snipt/114762/
javascript-iframe-buster
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>/* </span><span id="L-2"><a name="L-2"></a>Oftentimes you want to make sure your site isn&#39;t being IFRAME&#39;d. Sometimes it&#39;s for security reasons, other times it&#39;s so your site&#39;s content isn&#39;t being skimmed else, and other times it&#39;s...oh, who cares, you just want to do it. Here&#39;s a short way to escape frames: </span><span id="L-3"><a name="L-3"></a>*/ </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>if (top.location != self.location) { </span><span id="L-6"><a name="L-6"></a> top.location = self.location.href; </span><span id="L-7"><a name="L-7"></a>} </span></pre></div> </td></tr></table>
js