September 2015

jQuery plugin to dynamically register events on dynamically added items ondemand

 

(function ($) {
$.fn.EventHandler = function (options) {
var defaults = $.extend({}, options), $element, $eventsArray = [], $activityArray = [];
$element = $(this);
if (options.onEvent.length != 0) {
if(options.startEvent){
$element.on(options.startEvent, function(){
$eventsArray = options.onEvent;
$eventsArray.forEach(function (oneEvent) {
$(options.listen).on(oneEvent.event, function () {
$activityArray = oneEvent.activity;
$activityArray.forEach(function (activityArrayItem) {
$(options.target)[activityArrayItem.action](activityArrayItem.actionValue)
});
});
});
});
}
}
}
}(jQuery))
//AND USE IT LIKE THIS
$('.gqtrigger1').EventHandler({
startEvent: 'click',
listen: '#gq1',
target: '#col1',
onEvent: [
{
event: 'shown.bs.collapse',
activity: [
{
action: 'removeClass',
actionValue: 'fa-plus'
},
{
action: 'addClass',
actionValue: 'fa-minus'
}
]
},
{
event: 'hidden.bs.collapse',
activity: [
{
action: 'removeClass',
actionValue: 'fa-minus'
},
{
action: 'addClass',
actionValue: 'fa-plus'
}
]
}
]
});

jQuery plugin to dynamically register events on dynamically added items ondemand Read More »

Who is trustworthy, who do I trust?

I have a dream,
My future, can I trust you with my dream?
My dream, can I trust you with my youth?
Who is trustworthy, who do I trust?

I have a secret,
My spouse, can I trust you with my secret?
My secret, can I trust you with my weakness?
Who is trustworthy, who do I trust?

I have a story,
My friend, can I trust you with my story?
My story, can I trust you with my past?
Who is trustworthy, who do I trust?

I have some faith,
My church, can I trust you with my faith?
My faith, can I trust you with my logic?
Who is trustworthy, who do I trust?

I have some cash,
My today, do I trust you with my cash?
My cash, do I trust you with my tomorrow?
Who is trustworthy, who do I trust?

I have education,
Mr. Employer, can I trust you will consider my education?
My education, can I trust you in my interview?
Who is trustworthy, who do I trust?

I have a freewill,
My freedom, can I trust you with my freewill?
My freewill, can I trust you with my character?
Who is trustworthy, who do I trust?

I have principles,
My life, can I trust you will live my principles?
My principles, can I trust you with my humanity?
Who is trustworthy, who do I trust?

I have emotions,
My steadfastness, can I trust you with my emotions?
My emotions, can I trust you with my moods?
Who is trustworthy, who do I trust?

I listen carefully,
My neighbor,
Do I trust you have good intentions?
How do I trust you don’t intend me to open up?
What do you want to know when I start to open up?
I fear, am afraid, I fear, I don’t want to speak…
Who is trustworthy, who do I trust?

 

Who is trustworthy, who do I trust? Read More »

Faith & Rationalism Part 1

  1. God created evil…else, why did He create the tree of knowledge of good and evil? Because, first, good existed, but evil too existed, otherwise, God would have created the tree of knowledge of truth and trust, or faith and obedience, or worship and praise. There is no way God would expose us to something we can’t fathom. He knew we can understand what is good, and the opposite of it (which is evil). Because as much as we are created I the likeness of, we are not made to understand things we can’t conceive in our minds. And that’s where we seek Him for guidance. God is an orderly being, who values highrachy, which basically means, A HIGHER BEING MUST EXIST. We are all created to attribute everything unexplainable to Him Whom we can’t explain. We attribute what we can’t understand to He (Whom) we can’t understand. Anyway, the bible states very clearly that God created EVERYTHING. My understanding of the English term everything is wholly or in totality. It’s like saying that God didn’t create darkness. But there would never have existed the necessity to create light if darkness didn’t exist. Saying evil wasn’t created by God is like saying that God didn’t create darkness, which is similar to saying that there is, yet, a higher power, or higher authority than God, which is ultimately wrong, because there can never exist anything beyond infinity.
  2. Why did Lucifer promise to give Jesus all the kingdoms of the earth? Did they belong to Lucifer then? And why did they matter to Jesus? Because, else, Jesus would just have responded that He doesn’t need them… Lucifer was wise and was in no way going to ask Jesus to give up His solitude for something that wasn’t equally important to Him. So then, were Jesus and Lucifer’s equals before He (Jesus), was promoted to stay and live on the right hand of God? Because Jesus being elevated only explains that He had a lower rank.

Faith & Rationalism Part 1 Read More »