Helping you solve those tough coding problems!
Learn some great web development and web design tips and techniques through recipes that clearly define the problem being solved with a working solution.
Popular Tags: cakephp | theory | optimization | javascript-development | asp-net | css | jquery-development | sql | ajax | php-development

Search:
Follow @endyourif rss Facebook LinkedIn

Checking if an element exists with jQuery Checking if an element exists with jQuery

Published on Mar 19, 2019 by Jamie Munro

You want to do some conditional processing depending on if an item or items exist in your DOM (Document Object Model). By default, jQuery doesn't have a function that performs this; however, there is a very simple way to extend jQuery to do so.

Read more >

Tags: jquery | extend | JavaScript | jQuery

Creating Your Own jQuery Selector Creating Your Own jQuery Selector

Published on Mar 16, 2019 by Jamie Munro

By default, the jQuery selectors are pretty advanced. You can select items by classes, ids, attributes, the first, the last, etc… But why stop there? By simply extending jQuery, we can add our own custom selectors to further enhance how we use jQuery. In this example, I will create an extended function called widthOver300 leveraging jQuery's $.extend

Read more >

Tags: jquery | extend | JavaScript | jQuery

Deep clone an object with jQuery Deep clone an object with jQuery

Published on Feb 19, 2019 by Jamie Munro

To copy/clone an object using jQuery, you will want to leverage the extend function. This function accepts N objects to clone/merge as well as a boolean to indicate whether it should copy recursively or not.

Read more >

Tags: extend | JavaScript | jQuery | clone

CakePHP Extending one View from Another CakePHP Extending one View from Another

Published on Sep 20, 2012 by Jamie Munro

A new feature in CakePHP 2.1 is the ability to make one view extend another view.  This is a very neat feature; it's actually quite similar to the concept of Jquery templating.  The concept behind it is relatively straight forward.  You define one view that contains common elements that will be updated in another view.  The goal is to avoid duplicating the HTML in a different view.

Read more >

Tags: CakePHP | view | extend | CakePHP