Skip to content

Instantly share code, notes, and snippets.

@Reyjay
Reyjay / youtube-video-modal.html
Created July 10, 2014 19:21
Open a youtube video in a modal and stop it when the modal is closed
<!--- This is the video link --->
<a href="##"><img src="#videoItem.getImageUrl()#" data-link="#videoItem.getVideoLink()#" alt="#videoItem.getTitle()#"></a>
<!-- Video modal -->
<div class="modal videoModal" id="videoModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove-sign"></span></button>
</div>
@Reyjay
Reyjay / removeHtml.cfm
Created June 27, 2014 19:56
Remove html markup from variable
#REReplaceNoCase(text, "<[^[:space:]][^>]*>", "", "ALL")#

CSS Transitoin Mobile Menu Button

This is a nifty way to animate you mobile menu button into an x when it is open.

A Pen by Reyjay Solares on CodePen.

License.

@Reyjay
Reyjay / removeURLVar.cfm
Created April 21, 2014 17:45
This code removes a variable from the URL and returns the string.http://cflib.org/udf/QueryStringDeleteVar
<cfscript>
/**
* Deletes a var from a query string.
* Idea for multiple args from Michael Stephenson ([email protected])
*
* @param variable A variable, or a list of variables, to delete from the query string.
* @param qs Query string to modify. Defaults to CGI.QUERY_STRING.
* @return Returns a string.
* @author Nathan Dintenfass ([email protected]@changemedia.com)
* @version 1.1, February 24, 2002
@Reyjay
Reyjay / prevent_double_click
Created March 13, 2014 23:59
Prevent button from being double clicked on a form
<script type="text/javascript">
// jQuery plugin to prevent double submission of forms
jQuery.fn.preventDoubleSubmission = function() {
$(this).on('submit',function(e){
var $form = $(this);
if ($form.data('submitted') === true) {
// Previously submitted - don't submit again
e.preventDefault();
alert('prevented');
@Reyjay
Reyjay / Set_Record_Count.cfm
Created January 27, 2014 19:44
This will set the amount of items to display in a loop
<cfif $.slatwall.getProductSmartList().getPageRecordsShow() eq 10>
<cfset $.slatwall.getProductSmartList().setPageRecordsShow( 15 ) />
</cfif>
@Reyjay
Reyjay / js write inline and save in header footer
Created September 19, 2013 17:20
write in line and load in header of footer
@Reyjay
Reyjay / Comments_get_count.cfm
Created September 18, 2013 18:23
Get the count of mura comments in a detail page and add a hr
<cfif #$.content().getStats().getComments()# gte 1 >
<hr/>
</cfif>
@Reyjay
Reyjay / Display_Categories_Detail_Page.cfm
Created September 18, 2013 16:26
Display categories in a detail page in mura
<cfset rs=application.contentManager.getCategoriesByHistID(request.contentBean.getContentHistID())>
<cfloop query="rs">
#name#
</cfloop>
@Reyjay
Reyjay / Mura_Code_Snippits.cfm
Created September 11, 2013 17:06
Code Snippits
Associated Image URL - #item.getImageURL()#
*****ATRIBUTE SET****
Add custom attribute set to iterator loop - #item.getValue('ContentTypes')#
<cfproperty name="contentHistID" type="string" default="" required="true" />