Quantcast
Channel: Javascript – Digital Zoom Studio
Browsing all 15 articles
Browse latest View live

Tutorial – Fullscreen Button With Canvas

So lets start with defining the markup: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <meta charset=utf-8 />...

View Article



Tackling AJAX and script tags inside

So recently I had to make ajax requests that pull in a piece of page with some scripting inside. The context does not matter much, what matters is the script executed fine on my localhost but not as a...

View Article

Calculate Text Width with jQuery

This jQuery plugin should calculate the textwidth of elements. jQuery.fn.textWidth = function(){ var _t = jQuery(this); var html_org = _t.html(); if(_t[0].nodeName=='INPUT'){ html_org = _t.val(); } var...

View Article

add_query_arg and get_query_arg functions in javascript

add_query_arg function add_query_arg(purl, key,value){ key = escape(key); value = escape(value); var s = purl; var pair = key+"="+value; var r = new RegExp("(&|\\?)"+key+"=[^\&]*"); s =...

View Article

How to use wp media uploader in a external non-wp page or in frontend

Hello! I have a iframe shortcode generator inside of wordpress and I needed to get the wp uploader to insert media on it. Wheter you need it on a external page / frontend / whatever, this is the...

View Article


Image may be NSFW.
Clik here to view.

Custom Google Analytics Events in WordPress

Today we are going to learn how to integrate custom Google Analytics events in WordPress. For example I will setup a component I have here. Mick Jagger – RevengeBuy now! All we need is to setup the...

View Article

Format Time Functions xx:xx in PHP and Javascript

Today I am going to show you format time from this format x ( seconds ) to xx:xx . And the reverse. Javascript function from 90 to 1:30 function formatTime(arg) { //formats the time var s =...

View Article

Match javascript lines with comments on them

The regex should be \/\/ .*$ You can use this in IDE such as PHPSTORM

View Article


Match lines with comments in them

The regex should be (\/\/).*$ If you have a way to mark your useful comments. Like I have — to mark them, you can use it in the negative lookahead ( to filter only the unuseful comment ) (\/\/)(?! –)...

View Article


How to checkout / submit wordpress plugin in Mac OS X Terminal

First you need to enter your directory and to checkout: svn co https://plugins.svn.wordpress.org/your-plugin-name Add new files: svn add trunk/* Then you’ll need to svn ci -m 'description'        

View Article

CSS3 Free Online Tooltip Generator

Try it now – here

View Article

Convert php arguments to documentation html

Let us say you have a documented php function with arguments in this form 'display_type' => 'list',// -- "list" or "grid" or "grid-2" or "scroller" or "map" or "horizontal" 'grid_skin' =>...

View Article

How to force resize every 3 seconds javascript

Go to the text editor ( where you can input html content ) and input: <script>setInterval(function(){ if(window.jQuery){ jQuery(window).trigger('resize'); } },3000);</script>

View Article


React without webpack

create .babelrc on top of the partition D:\

View Article

Image may be NSFW.
Clik here to view.

Redux Javascript update state with multiple nested levels – immutable

The only solution I found is having this in the return statement of the reducer return { ...state ,[topic_id]:{ ...state[topic_id] ,matches:[ ...state[topic_id].matches ,subticket ] } } ; If there are...

View Article

Browsing all 15 articles
Browse latest View live




Latest Images