Search Results

Search found 119 results on 5 pages for 'haroldo'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • cant get jquery hover to work with .live()

    - by Haroldo
    the second function isnt working? $('.edit_hover').live('hover', function(e){ $(this).stop(); var half_width = ($(this).css('width').slice(0, -2))/2; var half_height = ($(this).css('height').slice(0, -2))*0.3; console.log(half_width); var top = ($(this).position().top) + half_height; var left = ($(this).position().left) + half_width; $('#edit_hover').css('top', top).css('left', left).fadeIn(300); //add overlay $(this).css('position', 'relative').append('<div class="edit_overlay" style="position: absolute; top:0px; left:0px; height:100%; width: 100%; background: #999; opacity: 0.5;"></div> ') }, function(){ $(this).stop(); $(this).find('.edit_overlay').remove(); $('#edit_hover').fadeOut(300); });

    Read the article

  • best way to store php data on a page for use with javascript/jquery?

    - by Haroldo
    Ok, so im trying to work out the fastest way of storing data on my page without slowing the page load: I need to store information in the page to be later used by jquery. My page is an events page and i want to attach data to each event anchor. there are 100+ events to attach data to. The events anchors are created with a php loop, so i could create the data elements within this loop using either use un-semantic tags ie *rel="some_data"* create a jquery.data() for each iteration of the loop or i could run the loop again, separately, this time inside script tags with jquery.data(); would really appreciate any thoughts on this!

    Read the article

  • How should i store availability calendar information in mysql? for [id] [date] [available/unavailab

    - by Haroldo
    I'm building a simple calendar for holiday cottages to show when they are booked or available. What would be the fastest mysql table design for this, bearing in mind when users mark dates as available/booked they will do so via a start date and an end date. i can see 2 obvious options Store 'booked' data for every day [more rows] or, store 'booked' data with 2 columns a start_date and end_date [more processing?] Which is best or is there another method i'm missing?

    Read the article

  • thoughts on making a widget?

    - by Haroldo
    I'm only going to be able to get each site that wants my widget, to copy and paste the code block in once.. So it needs to be really future proof. I've thought about this for a while and this is the widget code i've come up with : <script type="text/javascript" src="http://www.mydomain.com/my-future-proof-widget.js"></script> <div id="mywidget"></div> would this be the best plan? could this create any limitations? any other thoughts on widgetry?!

    Read the article

  • how do you install a PEAR package on WAMP, Windows 7?

    - by Haroldo
    I've no idea with command line stuff! What i've done: changed my php.ini to phar.require_hash - off ran go-pear.bat so i'm pretty sure i've got PEAR installed, now I'd like to install this package I've tried following the instructions but I really don't know how to do things with cmd.exe, would love some help!

    Read the article

  • facebook events to rss feed?

    - by Haroldo
    it looks like there used to be an export events button (to rss) but fb have removed it, i've looked at fbCal but it only exports the event name and the link to the event, but none of the event details. anyone got any ideas of how i can get multiple event details out of facebook?

    Read the article

  • Mysql SELECT with an OR across 2 columns

    - by Haroldo
    I'm creating a 'similar items' link table. i have a 2 column table. both columns contains product ids. The table is showing that these items are similar. However ids in the left column are more valuable. Say i want to select similar items to product '125b'. i only want 3 similar items to 125b. If there are any instances of 125b in col1 I would prefer these to finding 125b in col2. so i need a select statement along the lines of SELECT * FROM similar_items WHERE col_1={$id} OR col_2={$id} ORDER BY column(?) LIMIT 3 i do not want to do 2 separate queries ( ie query 2 if count(query1) <3 )

    Read the article

  • best way to access/create SITE_ROOT and SERVER_ROOT values in PHP?

    - by Haroldo
    I need 2 different paths, one for includes and one for js/css etc. I'm using mod_rewrite. The below works fine.... Currently all my files contain this at the top define('SERVER_ROOT', 'C:/wamp/www/site_folder/'); define('SITE_ROOT', 'http://localhost/site_folder/'); and then files are called like so: require_once SERVER_ROOT . 'st_wd_assets/inc/func_st_wd.php'; <link rel="stylesheet" type="text/css" href="<?php echo SITE_ROOT;?>st_pages/user_area/css/user_area.css" media="screen"/> as you can probably see, it's going to be a massive chore to update the top of every file everytime i move versions between the localhost and my live server. What's the best/standard way of defining these ROOT values? I can't see a solution in the $_SERVER super global? Do people normally just use VirtualHosts? But then wouldn't it still be necessary to define ROOT constants?

    Read the article

  • function to profile / performance test PHP functions?

    - by Haroldo
    I'm not experiencing any performance issues, however I'd like to take a look at what takes how long and how much memory cpu it uses etc. I'd like to get a firsthand understanding of which things can be bottle necks etc and improve any code i might reuse or build upon... (perfectionist) I'm looking to create a litte function that i can call at the begining and end of each function that records: execution time memory used cpu demand any ideas?

    Read the article

  • how can i search a lots of .js and .php files for a specific phrase?

    - by Haroldo
    Windows has a go at it but only gets a few when i seach a directory. Is there an IDE or similar that allows for searching within the files of an entire directory? for example, if I need to make sure no files require to a redundant class (old_class.php) I'd like to search for 'old_class.php' or alternatively if anyone knows a way to do this in Aptana (my text editor of choice) that would be amazing...

    Read the article

  • advanced css: top and bottom with flexible centre

    - by Haroldo
    is it possible with just css2 to have the following: all the content to be in the flexible div.mid section overlap the top and bottom parts not fussed about ie6 here's the photoshop with centre slice: as you can see the top and bottom parts are quite large and i need to overlap them from the middle slice... Please dont misunderstand here, i understand how to make a flexible central div, the complexity is in the overlapping of the top and bottom while the mid div remains flexible. I imagine it requires either negative margins or absolutely position top and bottoms elements with z-index..

    Read the article

  • quick [php function] -> [javascript function] question

    - by Haroldo
    if anyone fancies doing me a really quick favour, it would be really appreciated: static function make_url_safe($z){ $z = strtolower($z); $z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z); $z = str_ireplace(' ', '-', $z); return $z; } what js functions should i be looking at to convert this function to javascript?

    Read the article

  • performance: jquery.live() vs. creating specific listeners on demand?

    - by Haroldo
    I have a page with news item titles, clicking each one ajax loads a full news items including a photo thumbnail. I want to attach a lightbox to the thumbnails to show a bigger photo. I have two options (i think): .live() . $('img .thumb').live('click', function()) add a specific id based listener on callback of the news item click . $('div.news_item').click(function(){ var id = $(this).attr('id'); //click show_news_item(), //callback function(){$(id+' .thumb').lightbox();} })

    Read the article

  • What is XML good for and when should i be using it?

    - by Haroldo
    I'm curious, I've been developing pretty powerful websites/web apps, and I've never learnt XML, even odder I've never really felt the need to. It's not like Curl or Prepared Statements where before knowing what they did and how they worked I had a feeling 'there's got to be an easier way to do this!' or 'there's got to be something designed for this!'. Currently I work with MySQL and JSON and I don't have this feeling of 'I need to learn that' (XML), this must be wrong! I'm really interested to hear some compelling arguments for XML, and learn about things which it can do beter than JSON or MySQL (or some other aspect of web dev) and when i should be using it!

    Read the article

  • Any reasons not to gzip?

    - by Haroldo
    I remember someone telling me that gzipped content is not cached on some browsers? is this true? Are there any other reasons why I shouldn't gzip my content (pages, javascript and css files) with htaccess?

    Read the article

  • jquery ajax sucess - possible to return JSON instead of string?

    - by Haroldo
    To return an error from a $.ajax call, there's gotta be a better way than echoing an error in the ajax.php file and then trimming it! this seems very clumsy and in-robust: success: function(e){ var e = trim(e); if(e == 'SUCCESS') {alert('your password has been changed!');} if(e == 'ERROR1') {alert('please fill in all inputs!');} if(e == 'ERROR2') {alert('password incorrect!');} if(e == 'ERROR3') {alert('change failed!');} } what should i be doing instead?!

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >